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: 27/02/2021
12th Standard English Medium Computer Science Reduced syllabus Creative Three Mark Question with Answer key - 2021(Public Exam )
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.
Write the output of the following statements.
strl = 'mammals'
(i) std. find ('ma')
(ii) std. find ('ma', 2)
(iii) std. find ('ma', 2, 4)
(iv) std. find ('ma', 2, 5)
2.
Write a program to accept a string and print it in reverse order.
3.
Write the advantages of DBMS.
4.
What is the use of global keyword? Explain with an example?
5.
How python takes a default value in the function call? Explain with an example.
6.
Explain the working of the following program. class Sample:
def _init_(self, num):
print("Constructor of class Sample ...")
self.num=num
print("The value is :", num)
S=Sample(10)
7.
Write a python program to print all numbers from 10 to 15 using while loop.
8.
Write a note on sequential statement with an example.
9.
Write a note on self argument used in python class function.
10.
How will delete an entire tuple? Give an example.
11.
Explain the concept of list comprehension with an example programs.
12.
How will you change the list elements in Python? Give an example.
13.
Write a pseudo code for selection sort Algorithm.
14.
Write a pseudo code for Binary search
15.
Write a note on time/space trade off
16.
What are the rules followed while defining python identifier?
17.
Write a note on statement which are ignored by the Python interpreter.
18.
Why the following statement not accept the data as numbers? Give reason and also state what function is used to accept the number.
19.
Differentiate two ways in which Python programs can be written.
20.
Write a short note on types of variable scope.
21.
How will you ensure the principle of data encapsulation in object - oriented programming?
22.
Write a note on built-in scope.
23.
Give an example of an ADT for rational numbers.
24.
Write a short note an syntax for function types.
25.
Explain the syntax of function definitions.
1.
(i) 0
(ii) 3
(iii) -1
(iv) 3
2.
str1 = input ("Enter a string:")
Index=-1
while index >= -(lentstrl1)):
print ("Subscript[",index,"] :" + str1 [index])
index +=-1
Output:
Enter a string: welcome
Subscript [ -1 ] : e
Subscript [ -2 ] : m
Subscript [ -3 ] : 0
Subscript [ -4 ] : c
Subscript [ -5 ] : I
Subscript [ -6 ] : e
Subscript [ -7 ] : w
3.
Advantages of DBMS:
(i) Segregation of application program
(ii) Minimal data duplication or Data Redundancy
(iii) Easy retrieval of data using the Query Language
(iv) Reduced development time and maintenance
4.
The global keyword are used modify the global variable inside the function.
Changing Global Variable From Inside a Function using global keyword.
x = 0 # global variable
def add():
global x
x=x+5 # increment by 2
print ("Inside add() function x value is :",x)
add()
print ("In main x value is :", x)
Output:
Inside add() function x value is : 5
In main x value is : 5
5.
(i) In Python the default argument is an argument that takes a default value if no value is provided in the function call.
(ii) The following example uses default arguments, that prints default salary when no argument is passed.
(iii) Example:
def printinfo( name, salary = 3500):
print ("Name: ", name)
print ("Salary: ", salary)
return
printinfo("Mani")
When the above code is executed, it produces the following output
Output:
Name: Mani
Salary: 3500
When the above code is changed as print info("Ram", 2000) it produces the following output:
Output:
Name: Ram
Salary: 2000
6.
(i) The above class "Sample': has only a constructor with one argument named as num. When the constructor gets executed, first the print statement, prints the "Constructor of class Sample ... " then, the passing value to the constructor is assigned to self.num and finally it prints the value passed along with the given string.
(ii) The above constructor gets executed automatically, when an object S is created with actual parameter 10. Thus, the Python displays the following output.
(iii) Constructor of class Sample ...
The value is: 10
Class variable defined within constructor keep count of number of objects created with the class.
7.
Example: Program to illustrate the use of while loop - to print all numbers from 10 to 15
i=10 # intializing part of the control variable
while (i<=15): # test condition
print (i, end='\t') # statements - block 1
i=i+1 # Updation of the control variable
Output:
10 11 12 13 14 15
8.
A sequential statement is composed of a sequence of statements which are executed one after another. A code to print your name, address and phone number is an example of sequential statement
Example:
# Program to print your name and address - example for sequential statement
print ("Hello! This is Shyam")
print ("43, Second Lane, North Car Street, TN")
Output:
Hello! This is Shyam
43, Second Lane, North Car Street, TN
9.
(i) Python class function or Method is very similar to ordinary function with a small difference that, the class method must have the first argument named as self.
(ii) No need to pass a value for this argument when we call the method. Python provides its value automatically.
(iii) Even if a method takes no arguments, it should be defined with the first argument called self.
(iv) If a method is defined to accept only one argument it will take it as two arguments ie. self and the defined argument.
10.
(i) To delete an entire tuple, the del command can be used.
(ii) Syntax: del tuple_name
(iii) Example:
Tup1 = (2, 4, 6, 8, 10)
print("The elements of Tup1 is ", Tup 1)
del Tup1
print (Tup 1)
11.
(i) List comprehension is a simplest way of creating sequence of elements that satisfy a certain condition.
(ii) Syntax:
List = [ expression for variable in range ]
(iii) Example: Generating squares of first 10 natural numbers using the concept of List comprehension.
> > > squares = [x ** 2 for x in range(1, 11) ]
> > > print (squares)
Output:
[1, 4, 9, 16, 25, 36, 49, 64, 81, 100]
12.
In Python, the lists are mutable, which means they can be changed. A list element or range of elements can be changed or altered by using simple assignment operator (=).
Example:
MyList = [1,3,5,7,9]
print ("List Odd numbers ... ")
for x in MyList:
print (x)
MyList[0:5] = 2, 4, 6, 8, 10
print ("List Even numbers ... ")
for y in MyList:
print (y)
13.
(i) Start from the first element i.e., index-0, we search the smallest element in the array, and replace it with the element in the first position.
(ii) Now we move on to the second element position, and look for smallest element present in the sub-array, from starting index to till the last index of sub - array.
(iii) Now replace the second smallest identified in step-2 at the second position in the or original array, or also called first position in the sub array.
(iv) This is repeated, until the array is completely sorted.
14.
Start with the middle element:
(I) If the search element is equal to the middle element of the array i.e., the middle value = number of elements in array/2, then return the index of the middle element.
(ii) If not, then compare the middle element with the search value,
(iii) If the search element is greater than the number in the middle index, then select the elements to the right side of the middle index, and go to Step-1
(iv) If the search element is less than the number in the middle index, then select the elements to the left side of the middle index, and start with Step-1 ( When a match is found, display success message with the index of the element matched.
(vi) If no match is found for all comparisons, then display unsuccessful message
15.
(i) A space-time or time-memory trade off is a way of solving in less time by using more storage space or by solving a given algorithm in very little space by spending more time.
(ii) To solve a given programming problem, many different algorithms may be used. Some of these algorithms may be extremely time-efficient and others extremely spaceefficient.
(iii) Time/space trade off refers to a situation where you can reduce the use of memory at the cost of slower program execution, or reduce the running time at the cost of increased memory usage.
16.
(i) An identifier must start with an alphabet (A..Z or a..z) or underscore (_)..
(ii) Identifiers may contain digits (0 .. 9).
(iii) Python identifiers are case sensitive i.e. uppercase and lowercase letters are distinct. (iv) Identifiers must not be a python keyword.
(v) Python does not allow punctuation character such as %,$, @ etc., within identifiers.
17.
(i) In Python, comments begin with hash symbol (#). The lines that begins with # are considered as comments and ignored by the Python interpreter.
(ii) Comments may be single line or no multilines. The multiline comments should be enclosed within a set of # as given below.
# It is Single line Comment
# It is multiline comment
which contains more than one line #
18.
x = input ("Enter number")
Reason : If a 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.
19.
(i) In Python, programs can be written in two ways namely Interactive mode and Script mode.
(ii) The Interactive mode allows us to write codes in Python command prompt >>> whereas in script mode programs can be written and stored as separate file with the extension.
(iii) py and executed. Script mode is used to create and edit python source file.
20.
(i) Public members (generally methods declared in a class) are accessible from outside the class.
(ii) A variable which is declared outside of all the functions in a program is known as global variable.
(iii) 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.
(iv) Built-in scope the widest scope has all the names that are pre-loaded into program scope when we. start the compiler or interpreter.
21.
Public members (generally methods declared in a class) are accessible from outside the class. The object of the same class is required to invoke a public method. This arrangement of private instance variables and public methods ensures the principle of data encapsulation.
22.
(i) Built-in scope is the widest scope. 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 module which is defined in the library functions of a programming language has Built-in or module scope. They are loaded as soon as the library files are imported to the program.

(iii) Normally only Functions or modules come along with the software, as packages, therefore they will come under Built in scope.
23.
An ADT for rational numbers:
- - constructor
- - constructs a rational number with numerator n, denominator d
rational(n, d)
- - selector
number(x) \(\rightarrow \) returns the numerator of rational number x
denom(y) \(\rightarrow \) returns the denominator of rational number y
24.
The syntax for function types
x\(\rightarrow \)y
x1 \(\rightarrow \)x2\(\rightarrow \)y
x1 \(\rightarrow \) .... \(\rightarrow \)x n\(\rightarrow \)y
The 'x' and 'y' are variables indicating types. The type x \(\rightarrow \) y is the type of a function that gets an input of type 'x' and returns an output of type 'y'. Where as x1\(\rightarrow \) x2 -\(\rightarrow \) y is a type of a function that takes two inputs, the first input is of type 'x1' and the second input of type 'x1', and returns an output of type 'y'. Likewise x1 \(\rightarrow \)...\(\rightarrow \)x n\(\rightarrow \)y has type 'x' as input of n arguments and 'y' type as output.
25.
(i) The syntax to define functions is close to the mathematical usage: the definition is introduced by the keyword let, followed by the name of the function and its arguments; then the formula that computes the image of the argument is written after an = sign. If you want to define a recursive function: use "let rec" instead of "let".
(ii) Syntax: The syntax for function definitions:
let rec fn a1 a2 ... an :;= k
(iii) Here the 'fn' is a variable indicating an identifier being used as a function name. The names 'a1' to 'an' are variables indicating the identifiers used as parameters. The keyword 'rec' is required if 'fn' is to be a recursive function; otherwise it may be omitted.
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