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: 28/02/2021
12th Standard English Medium Computer Science Reduced Syllabus Annual Exam Model Question Paper - 2021
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 is the output of the following snippet?
i=1
while True:
if i%3 ==0:
break
print(i,end='')
i +=1
12
123
1234
124
2.
elif can be considered to be abbreviation of
nested if
if..else
else if
if..elif
3.
The Θ notation in asymptotic evaluation represents
Base case
Average case
Worst case
NULL case
4.
Time complexity of bubble sort in best case is
θ (n)
θ (nlogn)
θ (n2)
θ (n(logn) 2)
5.
This symbol is used to print more than one item on a single line.
Semicolon(;)
Dollor($)
comma(,)
Colon(:)
6.
Which of the following character is used to give comments in Python Program?
#
&
@
$
7.
The members that are accessible from within the class and are also available to its sub classes is called
Public members
Protected members
Secured members
Private members
8.
Which members are accessible from outside the class?
Public members
Protected members
Secured members
Private members
9.
The process of binding a variable name with an object is called
Scope
Mapping
late binding
early binding
10.
Which of the following is constructed by placing expressions within square brackets?
Tuples
Lists
Classes
quadrats
11.
The data type whose representation is known are called
Built in datatype
Derived datatype
Concrete datatype
Abstract datatype
12.
The data structure which is a mutable ordered sequence of elements is called
Built in
List
Tuple
Derived data
13.
Which of the following carries out the instructions defined in the interface?
Operating System
Compiler
Implementation
Interpreter
14.
Which of the following defines what an object can do?
Operating System
Compiler
Interface
Interpreter
15.
The values which are passed to a function definition are called
Arguments
Subroutines
Function
Definition
16.
How will you create a set using list or tuple? Give an example.
17.
Write a pseudo code for bubble sort algorithm
18.
Write a pseudo code for linear search
19.
Write a short about the followings with suitable example:
(a) capitalize( )
(b) swapcase( )
20.
List the differences between break and continue statements.
21.
Using if..else..elif statement write a suitable programs to display largest of 3 numbers.
22.
List the characteristics of an algorithm.
23.
Identify Which of the following are List, Tuple and class ?
(a) arr [1, 2, 34]
(b) arr (1, 2, 34)
(c) student [rno, name, mark]
(d) day= (‘sun’, ‘mon’, ‘tue’, ‘wed’)
(e) x= [2, 5, 6.5, [5, 6], 8.2]
(f) employee [eno, ename, esal, eaddress]
24.
What is the side effect of impure function. Give example.
25.
Write a Python script to create a table called ITEM with following specification.
Add one record to the table.
Name of the database :- ABC
Name of the table :- Item
Column name and specification :-
| I code | :- | Integer and act as primary key |
| Item Name | :- | Character with length 25 |
| Rate | :- | Integer |
| Record to be added | :- | 1008, Monitor, 15000 |
26.
Write a Python program to execute the following c++ coding.
#include <iostream>
using namespace std;
int main()
{ cout<<“WELCOME”;
return(0);
}
The above C++ program is saved in a file welcome.cpp
27.
What are the components of SQL? Write the commands in each.
28.
Write a menu driven program to add or delete stationary items. You should use dictionary to store items and the brand.
29.
What is nested tuple? Explain with an example.
30.
Write a program to display multiplication table for a given number.
31.
Write a detail note on if..else..elif statement with suitable example.
32.
Write any Five Characteristics of Modules.
33.
How will you access the multi-item. Explain with example.
34.
How will you facilitate data abstraction. Explain it with suitable example.
35.
Explain with an example interface and implementation.
36.
Differentiate python class function and ordinary function.
37.
Write the output.
A = {'A', 2, 4, 'D'}
B = {'A', 'B', 'C' 'D'}
print (A | B)
print (A & B)
print (A - B)
print (A ^ B)
38.
Give an example of joining two tuples.
39.
Write a python program to print the following output [36,49,64,81,100]
40.
Write the output for the following code
(i) print (list (range (1, 11, 2)))
(ii) print (list (range(2, 11, 2)))
41.
What is modular programming?
42.
Write the output of the following program
a:=10
Disp():
a:=7
print a
Disp 1():
print a
1.
(a)
12
2.
(c)
else if
3.
(b)
Average case
4.
(a)
θ (n)
5.
(c)
comma(,)
6.
(a)
#
7.
(b)
Protected members
8.
(a)
Public members
9.
(b)
Mapping
10.
(b)
Lists
11.
(c)
Concrete datatype
12.
(b)
List
13.
(c)
Implementation
14.
(c)
Interface
15.
(a)
Arguments
16.
A list or Tuple can be converted as set by using set( ) function. This is very simple procedure. First you have to create a list or Tuple then, substitute its variable within set( ) function as argument.
Example:
MyList= [2, 4, 6, 8, 10]
MySet=set(MyList)
print(MySet)
Output:
{2, 4, 6, 8, 10}
17.
(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.
18.
(i) Traverse the array using 'for loop'
(ii) In every iteration, compare the target search key value with the current value of the list.
(iii) If the values match, display the current index and value of the array
(iv) If the values do not match, move on to the next array element
(v) If no match is found, display the search element not found.
19.
| Syntax | Description | Example |
| (a) capitalize() | Used to capitalize the first character of the string | >>> city="chennai" >>> print(city, capitalize( )) Chennai |
| (b) swapcase( ) | It will change case of every character to its opposite case vice-versa. | >>> strl="tAmilL NaDu" >>>print(strl.swapcase( )) TaMIl nAdU |
20.
| Break | Continue |
| The break statement terminates the loop containing it. | The continue statement is used to skip the remaining part of a loop. |
| Control of the program flows to the statement immediately after the body ot the loop. | Control of the program flows start with next iteration |
| Syntax : break | Syntax : continue |
21.
Code :
n1 = int(input(:Enter the first number:"))
n2 = int(input("Enter the second number:")
n3 = int(input(:Enter the third number:")
if(n1?=n2) and(n1>=n3) :
biggest = n1 ;
elif(n2>=nl)and (n2>=n3) :
biggest = n2
else:
biggest = n3
print("The biggest number between",n1,",",n2"and"n3"is",biggest)
Output :
Enter the first number : 1
Enter the second number : 3
Enter the third number : 5
The biggest number between 1, 3 and 5 is 5
22.
(i) Input
(ii) Output
(iii) Finiteness
(iv) Definiteness
(v) Effectiveness
(vi) Correctness
(vii) Simplicity
(viii) Unambiguous
(ix) Feasibility
(x) Portable
(xi) Independent
23.
(a) List
(b) Tuple
(c) Class
(d) Tuple
(e) List
(f) Class
24.
The variables used inside the function may cause side effects though the functions which are not passed with any arguments. In such cases the function is called impure function.
For example the mathematical function random() will give different outputs for the same function call.
let randomnumber :=
a := random()
if a > 10 then
return: a
else
return: 10
25.
Program:
import mysql db
db = mysqldb.connect ("local host", "user", "123", "organization'")
cursor = db.cursor()
item table creation
database: ABC, table: Item, lcode: int, ItemName: Char
Rate: int. Record: 1008, Monitor: 15000
cursor.execute ("Create table item(icode int, item Name char (25), Rate int"));
db.close
cursor. execute ("insert into item values ("1008", 'Monitor', '15000" ));
db.commit()
26.
Execution Steps:
//save above file as welcome.cpp
#Now select File -> New in Notepad and type the Python program
#save the file as fun.py
#Program that compiles and executes a .cpp file
#Python fun.py- iC: |pyprg| welcome - file.cpp
Program:
import sys, os, getopt
def main (argv):
cpp_file="
exe_file="
opts, args = getopt.getopt(argv, "i:", ['ifile='])
for o a in opts
if o in ("-i, "--ifile"):
cpp_file=a+ .'cpp'
exe_file = a+ 'exe'
run (cpp_file, exe_file)
def run (cpp_file, exe_file):
print("Compiling" + Cpp_file)
os.system ('g++' + cpp_file+'_o'+exe_file)
print("Running" + exe_file)
print("---------------")
print
Os.system(exe_file)
print
if_name_=='_main_':
main (sys.argv [1:])
Output:
welcome.
27.
SQL commands are divided into five categories:
Data Definition Language:
(i) The Data Definition Language (DDL) consist of SQL statements used to define the database structure or schema.
(ii) It simply deals with descriptions of the database schema and is used to create and modify the structure of database objects in databases.
(iii) The DDL provides a set of definitions to specify the storage structure and access methods used by the database system.
DDL performs the following functions:
(i) It should identify the type of data division such as data item, segment, record and database file.
(ii) It gives a unique name to each data item type, record type, file type and data base.
(iii) It should specify the proper data type.
(iv) It should define the size of the data item.
(v) It may define the range of values that a data item may use.
(vi) It may specify privacy locks for preventing unauthorized data entry.
Commands:
| CREATE | To create tables in the database. |
| ALTER | Alters the structure of the database |
| DROP | Data tables from database. |
| TRUNCATE | Remove all records from a table, also release the space occupied bv those records. |
Data Manipulation Language:
This is a computer programming language used for adding, removing and modifying data in a database. This language comprises the SQL-data change statements, which modify stored data but not the schema of the database table
Data Manipulation includes
(i) Insertion of new information into the database
(ii) Retrieval of information stored in a database
(iii) Deletion of information from the database.
(iv) Modification of data stored in the database
The DML is basically of two types:
Procedural DML - Requires a user to specify what data is needed and how to get it.
Non-Procedural DML - Requires a user to specify what data is needed without Specifying how to get it.
Commands:
| INSERT | Inserts data into a table |
| UPDATE | Updates the existing data within a table |
| DELETE | Deletes all records from a table, but not the space occupied by them. |
Data Control Language:
(i) A Data Control Language (DCL) is a programming language used to control the access of data stored in a database. It is used for controlling privileges in the database (Authorization).
(ii) The privileges are required for performing all the database operations such as creating sequences, views of tables etc.
Commands:
| GRANT | Grants permission to one or more users to perform specific tasks. |
| REVOKE | Withdraws the access permission given by the GRANT statement. |
Transactional Control Language:
Transactional control language (TCL) commands are used to manage transactions in the database. These are used to manage the changes made to the data in a table by DML statements.
Commands:
| COMMIT | Saves any transaction into the database permanently. |
| ROLL BACK | Restores the database to last commit state. |
| SAVE POINT | Temporarily save a transaction so that you can rollback. |
Data query language:
The Data Query Language consist of commands used to query or retrieve data from a database. One such SQL command in Data Query Language is
| SELECT | It displays the records from the table. |
28.
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 |
29.
In Python, a tuple can be defined inside another tuple; called Nested tuple. In a nested tuple, each tuple is considered as an element. The for loop will be useful to access all the elements in a nested tuple.
Example:
Toppers = (("Vinodini", "XII-F", 98.7), ("Soundarya", "XII-H", 97.5),
("Tharani", "XII-F", 95.3), ("Saisri", "XII-G", 93.8))
for i in Toppers:
print(i)
Output:
('Vinodini', 'XII-F', 98.7)
('Soundarya', 'XII-H', 97.5)
('Tharani', 'XII-F', 95.3)
('Saisri', 'XII-G', 93.8)
30.
Multiplication table :
num =int(input("Enter the number: "))
print("multiplication Table of", num)
for i in range(1,11):
print (num,"x",i, "= ",num*i )
Output :
Enter the number : 6
Multiplication Table of 6
6 x 1 = 6
6 x 2 = 12
6 x 3 = 18
6 x 4 = 24
6 x 5 = 30
6 x 6 = 36
6 x 7 = 42
6 x 8 = 48
6 x 9 = 54
6 x 10 = 60.
31.
Nested if..elif..else statement :
(i) When we need to construct a chain of if statement(s) then 'elif' clause can be used instead of 'if else'.
(ii) Syntax:
if < condition - 1>:
statements-block 1
elif < condition - 2>:
statements-block 2
else:
statements-block n
(iii) In the syntax of if..elif ..else mentioned above, condition -1 is tested if it is true then statements-block 1 is executed, otherwise, the control checks condition-2, if it is true statements-block 2 is executed and even if it fails statements-block n mentioned in else part is executed.
(iv) 'elif' clause combines if..else-if ..else statements to one if..elif ... else. 'elif' can be considered to be abbreviation of 'else if'. In an 'if' statement there is no limit of 'elif' clause that can be used, but an 'else' clause if used should be placed at the end.
(v) Example: # Program to illustrate the use of nested if statement
| Average | Grade |
| > = 80 and above | A |
| > = 70 and < 80 | B |
| > = 60and < 70 | C |
| > = 50 and < 60 | D |
| Otherwise | E |
m1 = int (input("Enter mark in first subject:"))
m2 = int (input("Enter mark in second subject:"))
avg = (m1+m2)/2
if avg > =80:
print ("Grade : A")
elif avg > =70 and avg < 80:
print ("Grade : B")
elif avg > =60 and avg < 70:
print ("Grade : C")
elif avg > =50 and avg < 60:
print ("Gradec: D")
else:
print("Grade : E")
Output 1:
Enter mark in first subject : 34
Enter mark in second subject : 78
Grade : D
Output 2:
Enter mark in first Subject : 67
Enter mark in second subject : 73
Grade: B
32.
The following are the desirable characteristics of a module.
(i) Modules contain instructions, processing logic, and data.
(ii) Modules can be separately compiled and stored in a library.
(iii) Modules can be included in a program.
(iv) Module segments can be used by invoking a name and some parameters.
(v) Module segments can be used by other modules.
33.
(i) The structure construct (In OOP languages it's called class construct) is used to represent multi-part objects where each part is named (given a name). Consider the following pseudo code:
Class Person:
creation()
first Name:=""
last Name:=""
id :=""
email :=""
The new data type Person is pictorially represented as
In the case of something more complex, like a person, we have a multí-item object where each item is a named thing: the first name, the last name, the id, and the email. One could use a list to represent a person:
Person = ['padmashri', 'Baskar', '994-222-1234', 'compsci@gmail.com']
| Let main() contains | |
| p1:=Person() | statement creates the object |
| first name:= "padmashri" | setting a field called firstName with value padamashri |
| last name:= "Baskar" | setting a field called last name with value Baskar |
| id:= "994-222-1234" | setting a field called id value 994-222-1234 |
| email="compsci@gmail.com" | setting a field called email with value compsci@gmail.com |
| -- output of firstName: Padmashri | |
(ii) The class (structure) construct defines the from for multi-part objects that represent a person.
(iii) Person is referred to as a class or a type, while pl is referred to as an object or an instance.
(iv) Here class Person as a Cookie cutter, and pl as a particular cookie, Using the cookie cutter you can make many cookies, Same way using class created many objects of that type.
(v) A class defines a data abstraction by grouping related data items. A class is not just data, it has functions defined within it, We say such functions are subordinate to the class because their job is to do thngs with the data of the class.
34.
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)
35.
Interface:
(i) An interface is a set of action that an object can do. For example when you press a light switch, the light goes on, you may not have cared how it splashed the light. In Object Oriented Programnming language, an Interface is a description of all functions.
(ii) In our example, anything that "ACTS LIKE" a light, should have function definitions like turn_on () and a turn_off (). The purpose of interfaces is to allow the Computer to enforce the properties of the class.
Implementation:
(i) Implementation carries out the instructions defined in the interface.
(ii) How the object is processed and executed is the implementation.
(iii) A class declaration combines the external interface (its local state) with an implementation of that interface (the code that carries out the behaviour).
For example, let's take the example of increasing a car's speed.

(iv) The person who drives the car doesn't care about the internal working. To increase the speed of the car he just presses the accelerator to get the desired behaviour. Here the accelerator is the interface between the driver (the calling / invoking object) and the engine ( the called object).
(v) In this case, the function call would be speed (70):, this is the interface Internally, the engine of the car is doing all the things but fuel, air, pressure, and electricity come together to create the power to move the vehicle.
(vi) All of these actions are separated from the driver, who just wants to go faster. Thus we separate interface from implementation.
36.
Python class function or method is very similar to ordinary function with a small difference. The class method must have the first argument named as self.
37.
Output:
{'A', 2, 4, 'D', 'B' ,'C'}
{'A', 'D'}
{2, 4}
{2, 4, 'B", C'}
38.
# Program to join two tuples
Tup1 = (2,4,6,8,10)
Tup2 = (1,3,5,7,9)
Tup3 = Tup1 + Tup2
print(Tup3)
Output:
(2, 4, 6, 8, 10, 1, 3, 5, 7, 9)
39.
s = [ ]
for x in range (6, 11)
a=x**2
s. append (a)
print (s)
40.
Output:
(i) [1, 3, 5, 7, 9]
(ii) [2, 4, 6, 8, 10]
41.
The process of subdividing a computer program into separate sub-programs is called modular programming.
42.
The output of the program
7
10
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