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: 13/09/2019
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.
What will be the output of print (len("CHENNAI"))?
7
8
9
Error
2.
The _______ keyword is used along with the SELECT command to eliminate duplicate rows in the table?
DUPLICATE
DISTINCT
ELIMINATE
a ro b
3.
In __________ where the data is organized as row and column
Database
DBMS
File or table
Procedure or methods
4.
A variable prefixed with __________ become private in nature.
double underscore
double colon
double dot
double hyphen
5.
Control of the program flows to the statements immediately after the body of the loop by using ____ statements.
continue
pass
break
goto
6.
Which of the following is used to alter the control flow of the process depending on the state of the process?
control structure
control statement
program statement
control structure or control statement
7.
Python source file is created using _____ mode.
Interactive
Script
Procedure
Program
8.
Which of the following are functions that build the abstract datatypet?
Constructors
Destructors
Selectors
All of these
9.
The function definition is introduced by the keyword
def
rec
let
infer
10.
Which database model represents parent-child relationship?
Relational
Network
Hierarchical
Object
11.
What is the use of type() function in python?
To create a Tuple
To know the type of an element in tuple.
To know the data type of python object
To create a list.
12.
Which of the following keyword is used to begin the function block?
define
for
finally
def
13.
Which of the following members of a class can be handled only from within the class?
Public members
Protected members
Secured members
Private members
14.
The data type whose representation is known are called
Built in datatype
Derived datatype
Concrete datatype
Abstract datatype
15.
Which of the following is a unit of code that is often defined within a greater code structure?
Subroutines
Function
Files
Modules
16.
Write a program in python to display the following output.
(i) 5 5 5 5 5
4 4 4 4
3 3 3
2 2
1
(ii) 1 2 3 4 5
1 2 3 4
1 2 3
1 2
1
17.
Explain the sorting algorithm that uses n-1 number passes to get the final sorted list.
18.
Write a menu driven program to add or delete stationary items. You should use dictionary to store items and the brand.
19.
How will you facilitate data abstraction. Explain it with suitable example.
20.
Explain with example Pure and impure functions.
21.
Write a note on pair datatype
22.
Write a query that selects all students whose age is less than 18 in order wise.
23.
What is class?
24.
Write note on break statement.
25.
What is an Algorithm?
26.
27.
Which constraint helps to set a limit value placed for a field?
28.
Write a note on
(i) isalnum ()
(ii) isalpha ()
(iii) isdigit ()
29.
Write a note on built-in scope.
30.
Explain the syntax of function definitions.
31.
What is the difference between Select and Project command?
32.
Write a class with two private class variables and print the sum using a method.
1.
(a)
7
2.
(b)
DISTINCT
3.
(c)
File or table
4.
(a)
double underscore
5.
(c)
break
6.
(d)
control structure or control statement
7.
(b)
Script
8.
(a)
Constructors
9.
(c)
let
10.
(c)
Hierarchical
11.
(c)
To know the data type of python object
12.
(d)
def
13.
(d)
Private members
14.
(c)
Concrete datatype
15.
(b)
Function
16.
(i) for i in range (5, 0,-1):
for j in range (1, i + 1):
print (i, end =' ')
print (end = '\n')
i+ = 1
(ii) for i in range (5, 0, -1):
for j in range (1, i + 1):
print (j end =' ')
print (i, end = '\n')
i+ = 1
17.
(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.
18.
class Mystore:
_prod_code = [ ]
_prod_name = [ ]
_cost price = [ ]
_prod quant = [ ]
def getdata(self):
selt.p= int (input ("Enter no. of products you need to store:"))
for x in range (self.p):
self._prod_code. append (int (input ("Enter Product Code:")))
self._prod_name. append (str (input ("Enter Product Name:"))
self._ cost_price. append (int (input ("Enter cost price:"))
def display (self):
print ("stock in stores")
print ("---------------------")
print ("Product Code\t Product name\t cost price")
print ("------------------")
for x in range (self.p):
print (self._prod_code [x], "\t\t", self._prod_name [x], "It \t", self._cost price [x])
print ("------------------------------")
def print_bill (self):
total_price =0
for x in range (self.p):
q= int(input("Enter the quantity for the product code %d:" %self._prod_code [x]))
self. Prod_quant.append (q)
total_price = total_price + self. _cost_price|x]* self._prod_quant [x]
print ("Invoice Receipt")
print ("---------------")
print ("Product Code\t Product Name\t Cost Price\t Quantity\t Total Amount")
print ("----------------")
for x in range (self.p):
print (self._Prod_code [x), "\t \t", self_prod-name[x], "\t \t",
self._cost_price[x], "\t \t", self._prod-quant [x], "\t \t",
self._prod_quant[x]*self._cost price [x])
print ("-------------------")
print ("Total Amount =", total_price")
S=Mystore ()
S.getdata ()
S.display ()
S.print_bill ()
Output:
Enter no. of products you need to store: 5
Enter Product code: 101
Enter Product Name: Notebook
Enter cost price: 25
Enter Product code: 201
Enter Product Name: pencil
Enter cost price: 35
Enter Product code: 301
Enter Product Name: Pen
Enter cost price: 35
Enter Product code: 401
Enter Product Name: Colour Pencils
Enter cost price: 50
Enter Product code: 501
Enter Product Name: Sketches
Enter cost price: 120
Stock in stores
| Product Code | Product Name | Cost Price |
| 101 | Notebook | 25 |
| 201 | Pencil | 35 |
| 301 | Pen | 35 |
| 401 | Colour pencils | 50 |
| 501 | Sketches | 120 |
Enter the quantity for the product code 101:10
Enter the quantity for the product code 201:15
Enter the quantity for the product code 301:10
Enter the quantity for the product code 401:20
Enter the quantity for the product code 501:10
Invoice Receipt
| Product Code | Product Name | Cost Price | Quantity | Total Amount |
| 101 | Notebook | 25 | 10 | 250 |
| 201 | Pencil | 35 | 15 | 525 |
| 301 | Pen | 35 | 10 | 350 |
| 401 | Colour pencils | 50 | 20 | 1000 |
| 501 | Sketches | 120 | 10 | 1200 |
| Total amount = 3325 |
19.
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)
20.
Pure functions:
(i) Pure functions are functions which will give exact result when the same arguments are passed.
(ii) For example the mathematical function sin (0) always results 0. This means that every time you call the function with the same arguments, you wil always get the same result.
(iii) A function can be a pure function provided it should not have any external variable which will alter the behavior of that variable.
let us see an Example:
Let square x : =
return: x * x
(iv) The above function square is a pure function because it will not give different results for same input.
(v) There are various theoretical advantages of having pure functions. One advantage is that if a function is pure, then if it is called several times with the same arguments, the compiler only needs to actually call the function once.
Example:
let length s:=
i:= 0
let i:= 0;
if i<strlen (s) then
-- Do something which doesn't affect s
++1
(vi) If it is compiled, strlen (s) is called each time and strlen needs to iterate over the whole of 's'. If the compiler is smart enough to work out that strlen is a pure function and that 's' is not updated in the loop, then it can remove the redundant extra calls to strlen and make the loop to execute only one time.
(vii) From these what we can understand, strlen is a pure function because the function takes one variable as a parameter, and accesses it to find its length. This function reads external memory but does not change it, and the value returned derives from the external memory accessed
Impure functions:
(i) The variables used inside the function may cause side effects through the functions which are not passed with any arguments. In which cases the function is called impure function.
(ii) When a function depends on variable or functions outside of its definition block, you can never be sure that the function will behave the same every time it's called. For example, the mathematical functions random ( ) will give different outputs for the same function call.
Example:
let randomnumber:=
a := random()
if a > 10 then
return: a
else
return: 10
(iii) Here the function Random is impure as it is not sure what will be the result when we call the function
21.
(i) A pair is a compound data type that holds two other pieces of data. The two ways of representing the pair data type.
(ii) The first way is using List construct and the second way to implement pairs is with the tuple construct.
22.
SELECT * FROM Student WHERE Age <= 18 ORDER BY Name;
23.
(i) Class is the main building block in Python.
(ii) Class is a template for the object.
(iii) Object is a collection of data and function that act on those data.
(iv) Objects are also called as instances of a class.
24.
The break statement terminates the loop containing it. Control of the program flows to the statement immediately after the body of the loop.
25.
An algorithm is a finite set of instructions to accomplish a particular task. It is a step-by-step procedure for solving a given problem.
26.
27.
Check Constraint: This constraint helps to set a limit value placed for a field. When we define a check constraint on a single column, it allows only the restricted values on that field. Example showing check constraint in the student table:
CREATE TABLE Student
(
Admno integer NOT NULL PRIMARY KEY
Name char(20) NOT NULL,
Gender char(1),
Age integer (CHECK<=19), ⟶ Check Constraint
Place char(10),
);
In the above example the check constraint is set to Age field where the value of Age must be less than or equal to 19.
28.
| Syntax | Description | Example | |
| (i) | isalnum () | Returns True if the string contains only letters and digit. It returns False. If the string contains any special character like _,@,#,*,etc. |
>>>str1='Save Earth' >>>str1.isalnum() False The function returns False as space is an alphanumeric character. >>>'save 1 Earth'. isalnum() True |
| (ii) | isalpha () | Returns True if the string contains only letters Otherwise return False. |
>>>'Click123'. isalpha() False >>>'python'.isalpha() True |
| (iii) | isdigit () | Returns True if the string contains only numbers. Otherwise it returns False |
>>>str1='Save Earth' >>>print(str1.isdigit()) |
29.
(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.
30.
(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.
31.
| Select | Project |
|---|---|
| 1. Symbol - σ | 1. Symbol - π |
| 2. Selecting a subset with tuples | 2. Contains a vertical subset of relation. |
| 3. Select filters out all tuples that don't satisfy the condition. |
3. Projection eliminates all attributes of the input relation except in the projection list. |
32.
Code:
class Sample:
def_init_(self, n1, n2):
self._n1=nt
self_n2-n2
def sum(self):
print ("Class Variable 1:" self_n1)
print ("Class Variable 2:", self_n2)
S=Sample (5,10)
S.sum()
Output:
Class Variable 1:5
Class Variable 2: 10
Sum: 15
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