12th Standard Syllabus & Materials
12th Standard
TN 12th Computer Applications மின்னணு தரவு பரிமாற்றம் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications மின் - வணிக பாதுகாப்பு அமைப்புகள் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications மின்னணு செலுத்தல் முறைகள் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications மின் - வணிகம் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications திறந்த மூல கருத்துருக்கள் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications வலையமைப்பு வடமிடல் Sample Question Papers Study Material - QB365 Set A

Published on: 03/02/2021
12th Standard Computer Science English Medium Reduced Syllabus Model Question paper - 2021 Part - 2
Download Tamil Nadu 12th Standard Computer Science question papers, model tests, one-mark questions, important questions, and public exam papers in PDF format. Free study materials and answer keys for TN State Board students.
Questions + Answers key
Take MCQ Computer Science Test

1.
______ in data visualization helps to show relationship in the data for more variables
Tables
Graphics
Charts
Dashboards
2.
Which type of chart shows the relationship between a numerical variable and categorical variable?
line
bar
pie
x-y plot
3.
Which of the following is a simple abstraction of complex real world data gathering environment?
Data redundancy
Data consistency
Data abstraction
Data model
4.
_________ is one such special variable which by default stores the name of the file
- - name - -
- - main - -
- - getopt - -
- - sys - -
5.
A variable prefixed with __________ become private in nature.
double underscore
double colon
double dot
double hyphen
6.
Class variable and methods are together known as _______ of the class
Objects
Functions
Statements
Members
7.
__________ represents an abstraction of the sequence of numbers
Dictionary
List
Set
Tuple
8.
________is used to describe the upper bound of a asymptotic function.
Big \(\mu \)
Big O
Big \(\Omega \)
Big \(\beta \)
9.
If reverse is set as True, list sorting is in
ascending order
descending order
no sorting
multiple sorting
10.
Which of the following is not a sorting technique?
Bubble
Binary
Insertion
Quick
11.
The ______ statements are ignored by the Python interpreter.
input ()
print ()
int ()
comments
12.
The inputs () accepts all data as _____ or ______
String or characters
String or numbers
Characters or numbers
integers or exponent
13.
The input () function helps to enter data at _____ by the user.
compile time
linking time
run time
module time
14.
15.
Which function helps to enter data at run time by the user?
input ()
read ()
get ()
Pyinput ()
16.
A________ is not just data, it has functions defined within it.
Class
List
Pair
Object
17.
Read the following statement and choose the correct statement(s).
(I) In Python, you don’t have to mention the specific data types while defining function.
(II) Python keywords can be used as function name.
I is correct and II is wrong
Both are correct
I is wrong and II is correct
Both are wrong
18.
Which of the following functions that retrieve information from the data type?
Constructors
Selectors
recursive
Nested
19.
The functions which will give exact result when same arguments are passed are called
Impure functions
Partial Functions
Dynamic Functions
Pure functions
20.
Which of the following is a unit of code that is often defined within a greater code structure?
Subroutines
Function
Files
Modules
21.
Explain the sorting algorithm that uses n-1 number passes to get the final sorted list.
22.
Explain the representation of Abstract datatype using rational numbers.
23.
Explain input() and print() functions with examples.
24.
Explain the types of scopes for variable or LEGB rule with example.
25.
How will you facilitate data abstraction. Explain it with suitable example.
26.
What is local variable?
27.
Write a program in python to check if the accepted number even or odd.
a = int(input("Enter any number:"))
if a%2==0:
print (a, "is an even number")
else:
print (a, "is an odd number")
28.
What is the use of LEGB rule?
29.
What is meant by scope of variable? Mention its types.
30.
31.
Write a pseudo code for bubble sort algorithm
32.
Write a note on two factors in which space required by an algorithm is decided.
33.
Write the function of the following
(i) Ctrl + N
(ii) Ctrl + S
(iii) F5
34.
Write a note on access modifiers of a class.
35.
Write a note on Data Abstraction.
1.
(c)
Charts
2.
(b)
bar
3.
(d)
Data model
4.
(a)
- - name - -
5.
(a)
double underscore
6.
(d)
Members
7.
(d)
Tuple
8.
(b)
Big O
9.
(c)
no sorting
10.
(b)
Binary
11.
(d)
comments
12.
(a)
String or characters
13.
(c)
run time
14.
(a)
15.
(a)
input ()
16.
(a)
Class
17.
(a)
I is correct and II is wrong
18.
(b)
Selectors
19.
(d)
Pure functions
20.
(b)
Function
21.
(i) Insertion sort is a simple sorting algorithm. It works by taking elements from the list one by one and inserting then in their correct position in to a new sorted list.
(ii) This algorithm builds the final sorted array at the end. This algorithm uses n-1 number of passes to get the final sorted list as per the pervious algorithm as we have discussed.
Pseudo for Insertion sort:
Step 1 - If it is the first element, it is already sorted.
Step 2 - Pick next element
Step 3 - Compare with all elements in the sorted sub-list
Step 4 - Shift all the elements in the sorted sublist that is greater than the value to be sorted Step 5 - Insert the value Step 6 - Repeat until list is sorted.
22.
(i) The basic idea of data abstraction is to structure programs so that they operate on abstract data. That is, our programs should use data in such a way, as to make as few assumptions about the data as possible.
(li) At the same time, a concrete data representation is defined as an independent part of the program.
(iii) Any program consist of two parts. The two parts of a program are, the part that operates on abstract data and the part that defines a concrete representation, is connected by a small set of functions that implement abstract data in terms of the concrete representation.
(iv) To illustrate this technique, let us consider an example to design a set of functions for manipulating rational numbers.
(v) Example: A rational number is a ratio of integers, and rational numbers constitute an important sub-class of real numbers. A rational number such as 8/3 or 19/23 is typically written as : < numerator > /< denominator >
(vi) where both the < numerator > and <denominator>
(vii) However, you can create an exact representation for rational numbers by combining together the numerator and denominator.
(viii) As we know from using functional abstractions, we can start programming productively before you have an implementation of some parts of our program.
(ix) Let us begin by assuming that you already have a way of constructing a rational number from a numerator and a denominator. You also assume that, given a rational number, you have a way of selecting its numerator and its denominator component.
23.
1. The print () Function:
ln Python, the print() function is used to display result on the screen. The syntax for print ( ) is as follows:
Example:
print ("String to be displayed as output")
print (variable)
print ("String to be displayed as output", variable)
print ("String1", variable, "string 2", variable, "String 3",....)
Example:
>>> print("Welcome to python Programming'")
welcome to Python Programoming
>>>x = 5
>>> y = 6
>>> z= X+Y
>>> print (z)
>>> print ("The sum =", z)
The sum = 11
>>>print ("The sum of", x, "and", y, "is", z)
The sum of 5 and 6 is 11.
The print () evaluates the expression before printing it on the monitor. The print () displays an entire statement which is specified within print(). Comma(,) is used as a separator in print () to print more than one item.
input () function:
In Python, input) function is used to accept data as input at run time. The syntax for input () function is
Syntax:
Variable = input ("prompt String')
Where, prompt string in the Syntax is a statement or message to the user, to knowwhat input can be given.
If a prompt string is used, it is displayed on the monitor; the user can provide expected data from the input device. The input() takes whatever is typed from the Keyboard and stores the entered data in the given Variable. If prompt string is not given in input() no message is displayed on the screen, then, the user will not know what is to be typed as input.
Example 1:
input () with prompt String
>>>City=input ("Enter your city:")
Enter your city: Madurai
>>>print ("I am from", city)
I am from Madurai
Example 2:
input() without prompt string
>>> city = input ()
Rajarajan
>>>print ("I am from", city)
I am from Rajarajan
in Example 2, the input () is not having any pronmpt string, thus the user will not know what is to be typed as input. If the user inputs irrelevant data as given in the above example then the output will be unexpected. So, to make your program more interactive, provide prompt string with input (). The input () accepts all data as string or characters but not as numbers. Ifa numerical value is entered, the input values should be explicitly converted into numeric data type. The int) function is used to convert string data as integer data explicitly.
Example 3:
X=int (input ("Enter Number 1:"))
Y= int (input ("Enter Number 2:" ))
print ("The Sum =", x + y)
Output:
Enter Number 1: 34
Enter Number 2:56
The Sum =90.
24.
Types of Variable Scope:
There are 4 types of Variable Scope, let's discuss them one by one:
Local Scope:
(i) Local scope refers to variables defined in current function. Always, a function will first look up for a variable name in its local scope. Only if it does not find it there, the outer scopes are checked.
Look at this example
| 1. Disp(): 2. a:=7 3. print a 4. Disp() |
Entire program |
Output of the Program 7 |
(ii) On execution of the above code the variable a displays the value 7, because it is defined and available in the local scope.
Global Scope:
(i) A variable which is declared outside of all the functions in a program is known as global variable.
(ii) This means, global variable can be accessed inside or outside of all the functions in a program.
Example:
| 1. a:=10 2. Disp(): 3. a:=7 4. print a 5. Disp() 6. print a |
Entire program |
Output of the Program 7 10 |
(iii) On execution of the above code the variable 'a' which is defined inside the function displays the value 7 for the function call Disp() and then it displays 10; because a is defined in global scope.
Enclosed Scope:
(i) All programming languages permit functions to be nested. A function (method) with in another function is called nested function.
(ii) A variable which is declared inside a function which contains another function definition with in it, the inner function can also access the variable of the outer function. This scope is called enclosed scope.
(iii) When a compiler or interpreter search for a variable in a program, it first search Local, and then search Enclosing scopes. Consider
the following example:
| 1. Disp(): 2. a:=10 3. Disp1() 4. print a 5. Disp1() 6. print a 7. Disp() |
Entire Program |
Output of the Program 10 10 |
(iv) In the above example Disp1( ) is defined with in Disp( ). The variable 'a' defined in Disp( ) can be even used by Disp1( ) because it is also a member of Disp( ).
Built-in Scope:
(i) The built-in scope has all the names that are pre-loaded into the program scope when we start the compiler or interpreter.
(ii) Any variable or function which is defined in the modules of a programming language has Built-in or module scope. They are loaded as soon as the library files are imported to the program.Consider the following example.
| Library files associated with the software |
LEGB rule :
The LEGB rule is used to decide the order in which the scopes are to be searched
for scope resolution. The scopes are listed below in terms of hierarchy (highest to
lowest).
.png)
25.
Data abstraction is used to define an Abstract Data Type (ADT), which is a collection of constructors and selectors. T facilitate data abstraction,you will need to create two types of functions : Constructors and Selectors.
Constructors :
(i) Constructors are functions that build the abstract data type.
(ii) Constructors create an object, bundling together different pieces of information.
(iii) For example, say you have an abstract data type called city.
(iv) This city object will hold the city's name, and its latitude and longitude.
(v) To create a city object, you'd use a function like city = makecity (name, lat, lon).
(vi) Here makecity (name, lat, lon) is the constructor which creates the object city.

Selectors :
(i) Selectors are functions that retrieve information from the data type.
(ii) Selectors extract individual pieces of information fromn the object.
(iii) To extract the information of a city object, you wouldused functions like
getname(city)
getlat(city)
getlon(city)
These are the selectors because these functions extract the information of the city object.
.png)
26.
A variable declared inside the function's body or in the local scope is known as local variable.
27.
Output:
Enter any number: 56
56 is an even number
Output 2:
Enter any number: 67
67 is an odd number
28.
The LEGB rule is used to decide the order in which the scopes are to be searched for scope resolution. The scopes are listed below in terms of hierarchy (highest to lowest).
29.
Scope of variable refers to the part of the program, where it is accessible, i.e., area where the variables can refer (use) it. The scope holds the current set of variables and their values. The two types of scopes - local scope and global scope.
30.
31.
(i) Start with the first element i.e., index = 0, compare the current element with the next element of the array.
(ii) If the current element is greater than the next element of the array, swap them.
(iii) If the current element is less than the next or right side of the element, move to the next element. Go to Step 1 and repeat until end of the index is reached.
32.
The space required by an algorithm is equal to the sum of the following two components:
(i) A fixed part is defined as the total space required to store certain data and variables for an algorithm. For example, simple variables and constants used in an algorithm.
(ii) A variable part is defined as the total space required by variables, which sizes depends on the problem and its iteration. For example: recursion used to calculate factorial of a given value n.
33.
(i) to open Python shell window.
(ii) to save the Python file.
(iii) to run the Python program.
34.
(i) Public members (generally methods declared in a class) are accessible from outside the class.
(ii) Protected members of a class are accessible from within the class and are also available to its sub-classes.
(iii) Private members of a class are denied access from outside the class. They can be handled only from within the class.
35.
(i) Data abstraction is supported by defining an abstract data type (ADT) which is a collection of constructors and selectors.
(ii) Constructors create an object, bundling together different pieces of information, while selectors extract individual pieces of information from the object.
12th Standard Syllabus & Materials
12th Standard
TN 12th Computer Applications களப்பெயர் முறைமை (DNS) Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications வலையமைப்பு எடுத்துக்காட்டுகள் மற்றும் நெறிமுறைகள் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications கணினி வலையமைப்பு ஓர் அறிமுகம் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications PHP-உடன் MySQL-ஐ இணைத்தல் Sample Question Papers Study Material - QB365 Set A
Tamilnadu Stateboard 12th Standard Subjects

Maths

Chemistry

Physics

Biology

Computer Science

Business Maths and Statistics

Economics

Commerce

Accountancy

History

Computer Applications

Biology

Computer Technology

Computer Applications

Computer Science

Business Maths and Statistics

Commerce

Economics

Maths

Chemistry

Physics

Computer Technology

History

Accountancy

Tamil

English

French
Tamilnadu Stateboard Standards