12th Standard Syllabus & Materials
12th Standard
TN 12th English Poem - 6 - Incident of the French Camp Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th English Prose - 6 - On the Rule of the Road Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th English Prose - 5 - The Chair Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th English Supplementary - 4 - The Midnight Visitor Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th English Poem - 4 - Ulysses Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th English Prose - 4 - The Summit Sample Question Papers Study Material - QB365 Set A

Published on: 01/09/2020
12th Standard Computer Science English Medium Sample 3 Mark Creative Questions (New Syllabus) 2020
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.
Which constraint helps to set a limit value placed for a field?
2.
List the data types used in SQL.
3.
Write the out put for the following statement.
strl = "Raja Raja Chozhan"
(i) print (strl. count ('Raja'))
(ii) print (strl. count ('R'))
(iii) print (strl. count ('A'))
(iv) print (strl. count ('a'))
(v) print (strl. count ('a', 0, 5))
(vi) print (strl. count ('a', 11))
4.
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)
5.
Write the syntax and example of using string characters.
6.
What is Relational Algebra?
7.
Write a short note on Relational data model.
8.
List the buttons in matlibplot window.
9.
Explain how a connect to be made to a database (Academy through python SQlite3.
10.
Write a note on format () with an example.
11.
How will you invoke the function after, the parameters are recognized by their parameter names? Explain with an example.
12.
How to import modules in python?
13.
Read the following program. Answer the following question. Class sample:
x, y= 10, 20
s= sample ()
print (s. x + s. y)
1. What does sample denotes?
2. What does x, y denotes?
3. What does s denotes?
14.
Write a python program that illustrate the use of destructor.
15.
Write the output of the following program.
class Sample:
num=0
def _init_(self, var):
Sample.num+=1
self. var=var
print("The object value is = ", var)
print("The count of object created Sample.num) =",
S1=Sample(15)
S2=Sample(35)
S3=Sample(45)
16.
Draw a flowchart that illustrate how looping construct gets executed.
17.
Write a python program to print all numbers from 10 to 15 using while loop.
18.
Write a program to read a file with default delimiter comma.
19.
How will create a set in python? Give an example.
20.
Read the following program and write the output according to the print statement mentioned
list = ['T', 'H', 'N', 'M']
del list [1]
(i) print (list)
del list [1:3]
(ii) print (list)
del list
(iii) print (list)
21.
Write a pseudo code for Insertion sort.
22.
Write a pseudo code for Binary search
23.
Write a short note on comment statement.
24.
Fill in the blanks.
>>> city = \(\overset { (1) }{ \_ \_ \_ \_ \_ } \) ("Enter your City")
Enter your city \(\overset { (2) }{ \_ \_ \_ \_ \_ } \)
>>> print ("I am from", \(\overset { (3) }{ \_ \_ \_ \_ \_ } \))
I am from Chennai
25.
How will you ensure the principle of data encapsulation in object - oriented programming?
26.
Write a note on Data Abstraction.
27.
Write an algorithm to check whether the entered number is even or odd.
1.
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.
2.
(i) char (Character)
(ii) varchar
(iii) dec (Decimal)
(iv) numeric
(v) int (Integer)
(vi) smallint
(vii) float
(viii) real
(ix) double
3.
(i) 2
(ii) 2
(iii) 0
(iv) 5
(v) 2
(vi) 1
4.
(i) 0
(ii) 3
(iii) -1
(iv) 3
5.
Syntax:
("String to be display with %vall and %vaI2" %(val1, vaI2))
Example:
name = "Rajarajan''
mark = 98
print ("Name: %s and Marks: %d" %(name,mark) )
Output:
Name: Rajarajan and Marks: 98
6.
(i) Relational Algebra, was first created by Edgar F Codd while at IBM. It was used for modeling the data stored in relational databases and defining queries on it.
(ii) Relational Algebra is a procedural query language used to query the database tables using SQL.
(iii) Relational algebra operations are performed recursively on a relation (table) to yield an output. The output of these operations is a new relation, which might be formed by one or more input relations.
7.
(i) The Relational Database model was first proposed by E.P. Codd in 1970. It is the most widespread data model used for database applications around the world.
(ii) The basic structure of data in relational model is tables (relations). All the information's related to a particular type is stored in rows of that table.
(iii) Hence tables are also known as relations in a relational model. A relation key is an attribute which uniquely identifies a particular tuple (row in a relation (tabler).
8.
9.
# Python code to demonstrate table creation and insertions with SQL
# importing module
import sqlite3
# connecting to the database
connection = sqlite3.connect ("Academy.db")
# cursor
cursor = connection.cursor ( )
10.
| format () | Returns the output based on the given format. 1. Binary format. Outputs the number in base 2. 2. Octal format. Outputs the number in base 8. 3. Fixed-point notation. Displays the number as a fixed-point number. The default precision is 6. |
format (value [, format_spec]) | x=14 y=25 print ('x value in binary :',format(x,'b')) print ('y value in octal :',format(y,'o')) print('y value in Fixed-point no ',format(y,'f')) Output: x value in binary: 1110 y value in octal: 31 y value in Fixed-point no: 25.000000 |
11.
(i) Keyword arguments will invoke the function after the parameters are recognized by their parameter names.
(ii) The value of the keyword argument is matched with the parameter name and so, one can also put arguments in improper order.
(iii) Example:
def printdata (name):
print ("Example-1 Keyword arguments")
print ("Name :",name)
return
# Now you can call printdatat() function
printdata(name = "Gshan")
When the above code is executed, it produces the following output:
Output:
Example-1 Keyword arguments
Name: Gshan
12.
(i) We can import the definitions inside a module to another module. We use the import keyword to do this.
(ii) Using the module name we can access the functions defined inside the module. The dot (.) operator is used to access the functions. The syntax for accessing the functions from the module is
<module name>. <function name>
(iii) Example: >>> factorial.fact(5)
13.
1. It denotes class name
2. x, y is a class variables of the class
3. S is an object created to access the members of the class
14.
Program to illustrate about the _del_( ) method
class Sample:
num=()
def _init_(self, var):
Sample.num+= 1
self.var=var
print("The object value is = ", var)
print("The value of class variable is = ", Sample.num)
def _del_(self):
Sample.num-=1
print("Object with value %d is exit from the scope"%self.var)
S1=Sample(15)
S2=Sample(35)
S3=Sample(45)
15.
Output:
The object value is = 15
The count of object created = 1
The object value is = 35
The count of object created = 2
The object value is = 45
The count of object created = 3
16.

17.
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
18.
#importing csv
import csv
#opening the csv file which is in different location with read mode
with open('c:\\pyprg\\ sample1.csv', 'r') as F:
#other way to open the file is f= ('c:\\pyprg\\ sample1.csv', 'r')
reader = csv.reader(F)
# printing each line of the Data row by row
print(row)
F.close ( )
19.
(i) A set is created by placing all the elements separated by comma within a pair of curly brackets. The set( ) function can also used to create sets in Python.
(ii) Syntax:
See Variable = {E1, E2, E3 .......... En}
(iii) Example:
> > > S1 = {1, 2, 3, 'A', 3.14}
> > > print(S1)
{1, 2, 3, 3.14, 'A'}
> > > S2={1, 2, 2, 'A', 3.14}
> > > print(S2)
{1, 2, 'A', 3.14}
In above examples, the set S1 is created with different types of elements without duplicate values. Whereas in the set S2 is created with duplicate values, but Python accepts only one element among the duplications, which means python removed the duplicate value because a set in Python cannot have duplicate elements.
20.
Output:
(i) ['T', 'N', 'M']
(ii) ['T'
(iii) Error
21.
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 sub-list that is greater than the value to be sorted
Step 5 - Insert the value
Step 6 - Repeat until list is sorted
22.
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
23.
(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 #
24.
(1) input
(2) Chennai
(3) City
25.
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.
26.
(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.
27.
(requires: x>= 0)
let rec even x :=
x=0II odd (x-I)
return 'even'
(requires: x > = 0)
let odd x :=
x< >0 && even (x-I)
return 'odd'
12th Standard Syllabus & Materials
12th Standard
TN 12th English Supplementary - 3 - The Hour of Truth (Play) Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th English Poem - 3 - All the World’s a Stage Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th English Prose - 3 - In Celebration of Being Alive Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th English Supplementary - 2 - Life of Pi 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