0% found this document useful (0 votes)
61 views24 pages

12th Std Computer Science Question Papers

This document contains model question papers for 12th standard Computer Science, structured into four parts with varying question types, including multiple choice, short answer, and descriptive questions. It covers topics such as Python programming, data structures, algorithms, and database management. Each part has specific instructions on how many questions to answer and includes a maximum mark allocation.

Uploaded by

absujith887
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views24 pages

12th Std Computer Science Question Papers

This document contains model question papers for 12th standard Computer Science, structured into four parts with varying question types, including multiple choice, short answer, and descriptive questions. It covers topics such as Python programming, data structures, algorithms, and database management. Each part has specific instructions on how many questions to answer and includes a maximum mark allocation.

Uploaded by

absujith887
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

34 Sura’s ➠ 12th Std  COMPUTER SCIENCE  Question Papers

th Reg. No.
PTA Model question paper - 1
part - III
Time Allowed : 3.00 Hours] COMPUTER SCIENCE [Maximum Marks : 70
PART - I
Note : (i) Answer all the questions. 15×1=15
(ii) Choose the most appropriate answer from the given four alternatives and write the option code and the cor-
responding answer.
1. A function definition which call itself :
(a) Pure function (b) Impure function
(c) Normal function (d) Recursive function
2. Expansion of ADT :
(a) Abstract Data Tuple (b) All Data Template
(c) Abstract Data Type (d) All Data Type
3. A variable which is declared inside a function which contains another function definition :
(a) Local (b) Global
(c) Enclosed (d) Built-in
4. Time complexity of bubble sort in best case is
(a) θ (n) (b) θ (nlogn)
(c) θ (n2) (d) θ (n(logn) 2)
5. Which operator is also called as Comparative operator?
(a) Arithmetic (b) Relational
(c) Logical (d) Assignment
6. What will be the output of the following python code?
for i in range(1, 10, 2):
print(i, end=’ ‘)
(a) 1 3 5 7 9 (b) 1 2 4 6 8
(c) 2 4 6 8 10 (d) 1 3 5 7 10
7. Which function is called anonymous function?
(a) Lambda (b) Recursion
(c) Function (d) define
8. Which of the following is the slicing operator?
(a) { } (b) [ ] (c) < > (d) ( )
9. If List = [17, 23, 41, 10] then [Link](32) will result
(a) [32,17,23,41,10] (b) [17,23,41,10,32]
(c) [10,17,23,32,41] (d) [41,32,23,17,10]
10. Which of the following method is used as destructor?
(a) __init__( ) (b) __dest__( )
(c) __rem__( ) (d) __del__( )
11. A column in database table is known as an :
(a) Attribute (b) Relation
(c) Tuple (d) Data
Sura’s ➠ 12th Std  COMPUTER SCIENCE  Question Papers  35

12. Pick odd one :


(a) Commit (b) Roll back
(c) Save point (d) Revoke
13. Which of the following creates an object which maps data to a dictionary?
(a) listreader() (b) reader()
(c) tuplereader() (d) DictReader ()
14. Which of the following is the special variable which by default stores the name of the file?
(a) __name__ (b) __init__
(c) __del__ (d) __def__
15. The most popular data visualization library which allows creating charts in few lines of code in Python.
(a) Matplotlib (b) Infographics
(c) Data visualization (d) pip
PART - II
Answer any six questions. Question No. 24 is compulsory. 6 × 2 = 12
16. What is Subroutine?
17. What are keywords in Python?
18. Write the syntax of creating User Defined Function in Python.
19. What is SQLite?
20. Write the syntax of creating dictionary in Python.
21. What is class in Pyton?
22. List any four DDL commands.
23. Write the expansion of (a) SWIG (b) MinGW
24. What will be the output of the following Python code?
Str1 = “Madurai”
print(Str1*3)
PART - III
Answer any six questions. Question No. 33 is compulsory. 6 × 3 = 18
25. Why access control is required?
26. Explain ternary operator in Python with an examples.
27. What is the role of range ( ) in for loop of Python?
28. Write a short note about the following.
(a) capitalize ( ) (b) swapcase ( )
29. Write any three uses of data visualization.
30. What are class members? How do you define it?
31. Compare Delete, Truncate and Drop in SQL.
32. Write a note on open( ) function of Python
33. Write execution table for the following Python code.
Marks=[10, 20, 30, 40, 50]
i=0
36 Sura’s ➠ 12th Std  COMPUTER SCIENCE  Question Papers

sum = 0
while i < 4:
sum+=Marks[i]
i+=1
PART - IV
Answer all the questions: 5 × 5 = 25
34. (a) Explain LEGB rule with example.
(OR)
(b) Discuss about Linear Search Algorithm.
35. (a) Explain the different operators in Python.
(OR)
(b) Explain briefly about Jump statements in Python.
36. (a) Explain the set operations supported by python with suitable example.

(OR)
(b)  Find the output of the following Python code
class Sample:
num=0
def __init__(self, var):
[Link]+=1
[Link]=var
print(“The object value is = “, var)
print(“The count of object created = “, [Link])
S1=Sample(15)
S2=Sample(35)
S3=Sample(45)
37. (a)  Explain the types of relationships used in a database.
(OR)
(b) Explain about the TCL commands with suitable examples.
38. (a)  Write a Python code to display all the records of the following table using fetchmany().
[Link] Name Marks
3001 Chithirai 353
3002 Vaigasi 411
3003 Aani 374
3004 Aadi 289
3005 Aavani 507
3006 Purattasi 521
(OR)
(b) Write a Python Script to display the following Pie chart.
Sura’s ➠ 12th Std  COMPUTER SCIENCE  Question Papers  37

ONE MARK ANSWERS

PART - I
1. (d) Recursive function
2. (c) Abstract Data Type
3. (c) Enclosed
4. (a) θ (n)
5. (b) 
Relational
6. (a) 1 3 5 7 9
7. (a) Lambda
8. (b) [ ]
9. (b) [17,23,41,10,32]
10. (d) __del__( )
11. (a) Attribute
12. (d) Revoke
13. (d) DictReader ()
14. (a) __name__
15. (a) Matplotlib

38 Sura’s ➠ 12th Std  COMPUTER SCIENCE  Question Papers

th Reg. No.
PTA Model question paper - 2
part - III
Time Allowed : 3.00 Hours] COMPUTER SCIENCE [Maximum Marks : 70

PART - I
Note : (i) Answer all the questions. 15×1=15
(ii) Choose the most appropriate answer from the given four alternatives and write the option code and the cor-
responding answer.
1. The variables in a function definition are called as
(a) Subroutines (b) Function
(c) Definition (d) Parameters
2. The data type whose representation is unknown is called.
(a) Built in datatype (b) Derived datatype
(c) Concrete datatype (d) Abstract datatype
3. Which of the following is used in programming languages to map the variable and object?
(a) :: (b) := (c) = (d) ==
4. Step by step procedure for solving a given problem:
(a) Program (b) Pseudo Code
(c) Flowchart (d) Algorithm
5. What will be the value of X from the following code snippet?
A, B = 10, 3
X = A if (A/B==3) else B
print(X)
(a) 3 (b) 10 (c) True (d) False
6. Which is not a jump statement?
(a) for (b) goto
(c) continue (d) break
7. Which of the following special character is used to define variable length arguments?
(a) & (b) $ (c) * (d) #
8. What is stride?
(a) index value of slice operation (b) first argument of slice operation
(c) second argument of slice operation (d) third argument of slice operation
9. Let setA ={3, 6, 9}, setB={1,3,9}. What will be the result of the following snippet? print(setA|setB)
(a) {3,6,9,1,3,9} (b) {3,9}
(c) {1} (d) {1,3,6,9}
10. Which of the following is the private class variable?
(a) __num (b) ##num
(c) $$num (d) &&num
11. What symbol is used for SELECT statement?
(a) σ (b) Π (c) X (d) Ω
Sura’s ➠ 12th Std  COMPUTER SCIENCE  Question Papers  39

12. Pick odd one:


(a) INSERT (b) DELETE
(c) UPDATE (d) TRANCATE
13. The file extension of Excel :
(a) exl (b) xls (c) cel (d) Ecl
14. Which method uses the SQL command to get all the data from the table?
(a) get (b) select
(c) execute (d) Query
15. The function to make a pie chart with Matplotlib:
(a) [Link]() (b) [Link]()
(c) [Link]() (d) [Link]()
PART - II
 nswer any six questions. Question No. 24 is compulsory.
A 6 × 2 = 12
16. Differentiate constructors and selectors.
17. Define control structure.
18. What is the use of lambda function?
19. What are membership operators in Python?
20. What is Matplotlib?
21. What is the purpose of Destructor?
22. What are the shapes to represent database structure in ER model?
23. Mention the two ways to read a CSV file using Python.
24. What will be the output of the following snippet?
Mydict={chr(x):x for x in range(97, 102)}
print(Mydict)
PART - III
Answer any six questions. Question No. 33 is compulsory. 6 × 3 = 18
25. Write a short note on the factors of measuring complexity of an algorithm.
26. What are the rules to be followed while creating an identifier in Python?
27. Draw a flow chart to explain while loop.
28. Differentiate ceil() and floor() function.
29. Write and explain the syntax of range( ).
30. What is the difference between the write mode and append mode?
31. What is the difference between Select and Project command?
32. Write short note on any three DDL commands.
33. Write a class with two private class variables and print the sum using a method.
PART - IV
Answer all the questions: 5 × 5 = 25
34. (a) 1. What are called Parameters?
2. Write a note on -
40 Sura’s ➠ 12th Std  COMPUTER SCIENCE  Question Papers

(i) Parameter without Type


(ii) Parameter with Type
(OR)
(b) How will you facilitate data abstraction? Explain it with suitable example.
35. (a) Explain about Lambda function with suitable example.
(OR)
(b) Explain about string operators in python with suitable example.
36. (a) What will be the output of the following Python program?
A={X*3 for x in range (1,6)}
B={y**2 for y in range (1,10, 2)}
Print(A)
Print(B)
Print(A/B)
Print(A-B)
Print(A&B)
Print(A˄B)
(OR)
(b)  What will be the output of the following Python code
class String :
def __init__(self):
[Link] = 0
[Link] = 0
[Link] = 0
[Link] = 0
[Link] = 0
[Link]=””
def getstr(self):
[Link]= “Welcome to Puducherry”
def count_upper(self):
for ch in [Link]:
if ([Link]()):
[Link]+=1
def count_lower(self):
for ch in [Link]:
if ([Link]()):
[Link]+=1
def count_vowels (self):
for ch in [Link]:
Sura’s ➠ 12th Std  COMPUTER SCIENCE  Question Papers  41

if (ch in (‘A’, ‘a’, ‘e’, ‘E’, ‘i’, ‘l’, ‘o’, ‘O’, ‘u’, ‘U’)):
[Link]+=1
def count_consonants(self):
for ch in [Link]:
if (ch not in (‘A’, ‘a’, ‘e’, ‘E’, ‘i’, ‘l’, ‘o’, ‘O’, ‘u’, ‘U’)):
[Link] +=1
def count_space(self):
for ch in [Link]:
if (ch==””):
[Link]+=1
def execute(self):
self.count_upper()
self.count_lower()
self.count_vowels()
self.count_consonants()
self.count_spaces()
def display(self):
print(“The given string contains...”)
print(“%d Uppercase letters”%[Link])
print(“%d Lowercase letters”%[Link])
print(“%d Vowels”%[Link])
print(“%d Consonants”%[Link])
print(“%d Spaces”%[Link])
S = String()
[Link]()
[Link]()
[Link]()
37. (a)  Explain the following operators in Relational algebra with suitable examples.
(1) Union (∪)
(2) Intersection (∩)
(OR)
(b) Consider the following employee table. Write SQL commands for the questions.(1) to (5).
EMP CODE NAME DESIG PAY ALLOWANCE
S1001 Hariharan Supervisor 29000 12000
P1002 Shaji Operator 10000 5500
42 Sura’s ➠ 12th Std  COMPUTER SCIENCE  Question Papers

P1003 Prasad Operator 12000 6500


C1004 Manjima Clerk 8000 4500
M1005 Ratheesh Mechanic 20000 7000

(1) To display the details of all employees in descending order of pay.


(2) To display all employees whose allowance is between 5000 and 7000.
(3) To remove the employees who are mechanic.
(4) To add a new row.
(5) To display the details of all employees who are operators.
38. (a)  Differentiate Excel file and CSV file.

(OR)
(b) Write the syntax for getopt() and explain its arguments and return values.

ONE MARK ANSWERS

PART - I
1. (d) Parameters
2. (d) Abstract datatype
3. (c) =
4. (d) Algorithm
5. (d) False
6. (a) for
7. (c) *
8. (d) third argument of slice operation
9. (d) {1,3,6,9}
10. (a) __num
11. (a) σ
12. (d) TRANCATE
13. (b) xls
14. (c) execute
15. (d) [Link]()

Sura’s ➠ 12th Std  COMPUTER SCIENCE  Question Papers  43

th Reg. No.
PTA Model question paper - 3
part - III
Time Allowed : 3.00 Hours] COMPUTER SCIENCE [Maximum Marks : 70

PART - I
Note : (i) Answer all the questions. 15×1=15
(ii) Choose the most appropriate answer from the given four alternatives and write the option code and the cor-
responding answer.
1. The function which will give exact result then same arguments are passed are called :
(a) Impure function (b) Partial Function
(c) Dynamic Function (d) Pure function
2. Which are loaded as soon as the library files are imported to the program?
(a) Built-in scope variables (b) Enclosed scope variables
(c) Global scope variables (d) Local scope variables
3. Which of the following is not a characteristic of an algorithm?
(a) Input (b) Program
(c) Finiteness (d) Simplicity
4. In how many ways programs can be written in Python?
(a) Two (b) Three
(c) Four (d) Five
5. What will be the output of the following Python snippet?
a=15
while (a<=20):
print(a%a, end=’ ’)
i=i+1
(a) 15 16 17 18 19 20 (b) 20 19 18 17 16 15
(c) 0 0 0 0 0 0 (d) 1 1 1 1 1 1
6. Which keyword to be used to define a function in Python?
(a) def (b) local
(c) rec (d) global
7. Which command can be used to remove entire string variable in Python?
(a) rem (b) remove
(c) del (d) delete
8. Which function is used to find length of a list in Python?
(a) for() (b) range()
(c) len() (d) length
9. In Python the class method must have which named argument as first argument?
(a) self (b) rec
(c) global (d) key
44 Sura’s ➠ 12th Std  COMPUTER SCIENCE  Question Papers

10. Which is the entire collection of related data in one table?


(a) tuple (b) attribute
(c) table (d) software
11. The TCL command used to restores the database to the last commit state:
(a) Commit (b) SavePoint
(c) Insert (d) Rollback
12. The python file mode opens a file for exclusive creation:
(a) w (b) x (c) b (d) a
13. Which of the following is the valid Python program file name?
(a) [Link] (b) [Link]
(c) pycpp.c (d) [Link]
14. The statement in SQL is used to retrieve data from a table in a database:
(a) SELECT (b) CREATE
(c) DISTINCT (d) ORDER BY
15. Which of the following is not a type of visualization under matplotlib?
(a) Histogram (b) Pie chart
(c) Box plot (d) SQLite
PART - II
Answer any six questions. Question No. 24 is compulsory. 6 × 2 = 12
16. What is the difference between interface and implementation.
17. What is enclosed scope?
18. What are the key features of Python?
19. What are the difference types of function arguments in Python?
20. What is swapcase( )? Write with an example.
21. Write a Python code to create a database in SQLite.
22. What are the advantages of DBMS?
23. What is CSV file?
24. What will be the output of the following snippet?
Set_A = {‘A’, 2, 4, ‘D’}
Set_B = {‘A’, ‘B’, ‘C’, ‘D’}
print(set_A & set_B)
PART - III
Answer any six questions. Question No. 33 is compulsory. 6 × 3 = 18
25. What are constructors and selectors?
26. Write a pseudo code for bubble sort algorithm.
27. Write a short note on input( ) in Python.
28. Write the syntax of if...elif...else statement in Python.
29. What is pie chart? How will you create pie chart in Python? Give an example.
Sura’s ➠ 12th Std  COMPUTER SCIENCE  Question Papers  45

30. What is a Public and Private data member in Python?


31. What is the use of DELETE, TRUNCATE and DROP commands in SQL?
32. What are the features of Python over C++?
33. Write a short note on string slicing with syntax and example.
PART - IV
Answer all the questions: 5 × 5 = 25
34. (a) Explain about Complexity of an algorithm.
(OR)
(b) Explain about the types of tokens in Python.
35. (a) What are the different types of loops in Python? Explain with an example.
(OR)
(b) What are the scopes of variables in Python?
36. (a) Write the short note on the following built-in string functions
(i) capitalize() (ii) isalpha()
(iii) isalnum() (iv) lower()
(OR)
(b)  What is dictionary? Write its syntax and differences between list and dictionary?
37. (a)  Rewrite the following Python program to get the given output:
OUTPUT :
Enter Radius: 5
The area = 78.5
The circumference = 34.10
CODE :
Class circle( )
pi=3.14
def__init__(self, radius):
self=radius
DEF area(SELF):
Return
[Link] + ([Link] * 2)
Def circumference (self):
Return 2*[Link] * [Link]
r = input(“Enter radius= “)
c = circle(r)
print “The Area: “, [Link]( )
print(“The circumference=”, c)
(OR)
(b) What are the characteristics of DBMS?
38. (a)  What are the different types of constraints in Database?
46 Sura’s ➠ 12th Std  COMPUTER SCIENCE  Question Papers

(OR)

(b) Draw the output for the following Python code.


a = [1, 2, 3]
b = [5, 7, 4]
x = [1, 2, 3]
y = [10, 14, 12]
[Link](a,b, label=’Lable 1’)
[Link](x,y, label=’Lable 2’)
[Link](‘X-Axis’)
[Link](‘Y-Axis’)
[Link]()
[Link]()

ONE MARK ANSWERS

PART - I
1. (d) Pure functions
2. (a) Built-in scope variables
3. (b) Program
4. (a) Two
5. (a) 15 16 17 18 19 20
6. (a) def
7. (c) del
8. (c) len()
9. (a) self
10. (c) table
11. (d) Rollback
12. (b) x
13. (a) [Link]
14. (a) SELECT
15. (d) SQLite

Sura’s ➠ 12th Std  COMPUTER SCIENCE  Question Papers  47

th Reg. No.
PTA Model question paper - 4
part - III
Time Allowed : 3.00 Hours] COMPUTER SCIENCE [Maximum Marks : 70

PART - I
Note : (i) Answer all the questions. 15×1=15
(ii) Choose the most appropriate answer from the given four alternatives and write the option code and the cor-
responding answer.
1. Which of the following are mandatory to write the type annotations in the function definition?
(a) { } (b) ( ) (c) [ ] (d) < >
2. Bundling two values together into one can be considered as
(a) Pair (b) Triplet (c) Single (d) Quadrat
3. This is a theoretical performance analysis of an algorithm :
(a) Priori estimates (b) Posteriori testing
(c) Space factor (d) Time factor
4. Which of the following statement(s) is not correct?
(1) Python is a general purpose programming language which can be used for both scientific and non-scientific
programming.
(2) Python is a platform independent programming language.
(3) The programs written in Python are difficult to read and understand.
(a) Statement (1) Only (b) Statement (1) and (2)
(c) Statement (3) Only (d) All statements
5. Match the following :
(a) if...elif - (i) Jump
(b) while - (ii) Block
(c) pass - (iii) Loop
(d) indentation - (iv) Branching
(a) (a)-(iv), (b)-(iii), (c)-(i), (d)-(ii) (b) (a)-(i), (b)-(iii), (c)-(iv), (d)-(ii)
(c) (a)-(iv), (b)-(i), (c)-(iii), (d)-(ii) (d) (a)-(i), (b)-(iv), (c)-(ii), (d)-(iii)
6. Non-keywords variable arguments are called as
(a) Sets (b) List
(c) Tuples (d) Dictionary
7. Which of the following is used as placeholders or replacement fields which get replaced along with format( )
function?
(a) { } (b) < > (c) ++ (d) ^^
8. Which Function is used to generate a series of values in Python?
(a) series() (b) range()
(c) list() (d) tuple()
9. The function defined inside a class is called as ______.
(a) Attribute (b) Parameter
(c) Arguments (d) Methods
48 Sura’s ➠ 12th Std  COMPUTER SCIENCE  Question Papers

10. What type of relationship does hierarchical model represents?


(a) one-to-one (b) one-to-many
(c) many-to-one (d) many-to-many
11. The SQL command ‘Truncate’ comes under:
(a) DDL (b) DML (c) TCL (d) DQL
12. In csv.register_dialect(), Which of the following parameter is used for removing whitespaces?
(a) removespace (b) skipinitialspace
(c) skipspace (d) removeinitialspace
13. _______ is a built-in variable which evaluates to the name of the current module.
(a) __name____ (b) __main__
(c) __mode__ (d) __init__
14. Which is a control structure used to traverse and fetch the records of the database?
(a) fetch (b) fetchall
(c) cursor (d) key
15. __________ plot is a type of plot that shows the data as a collection of points.
(a) Line (b) Scatter
(c) Box (d) Pie
PART - II
 nswer any six questions. Question No. 24 is compulsory.
A 6 × 2 = 12
16. What do yo mean by Namespace?
17. What are tokens in Python?
18. Write the syntax of while loop in Python.
19. Draw the chart for the given Python snippet.
import [Link] as plt
[Link]([1, 2, 3, 4], [1, 4, 9, 16])
[Link]()
20. Write any two basic rules of global scope keyword in Python.
21. What is set in Python?
22. What are DCL commands in SQL?
23. Write the applications of scripting languages.
24. What will be the output of the following Python snippet?
str1=”THOLKAPPIYAM”
print(str1([4:])
print(str1[4::2])
print(str1[::3])
print(str1[::–3])
Sura’s ➠ 12th Std  COMPUTER SCIENCE  Question Papers  49

PART - III
Answer any six questions. Question No. 33 is compulsory. 6 × 3 = 18
25. Write a function that finds the minimum of its three arguments.
26. How do you facilitate data abstraction?
27. Write the pseudo code for linear search.
28. Write a short note on :
(i) id () (ii) type ( ) (iii) chr ( )
29. Mention the difference between fetchone() and fetchmany().
30. How do you define constructor and destructor in Python?
31. Write a short note on Unary Relational Operations of DBMS.
32. How [Link]() function is used to create a normal CSV file in Python?
33. What will be the output of the following Python program?
str1 = “welcome”
str2 = “to school”
str3 = str1[:3]+str2[len(str2)-1:]
print(str3)
PART - IV
Answer all the questions: 5 × 5 = 25
34. (a) What are modules? What are its characteristics?
(OR)
(b) Write the pseudo code for selection sort algorithm.
35. (a) Explain about while loop in Python with suitable example.
(OR)
(b) Explain type of function arguments in Python with suitable examples.
36. (a) Explain the following string functions with suitable examples.
(i) center () (ii) find ()
(OR)
(b)  What will be the output of the following Python program?
N = []
for x in range(1, 11):
[Link](x)
Num=tuple(N)
print(Num)
for index, i in enumerate(N):
if(i%2==1):
del N[index]
print(N)
37. (a)  Explain the types of relationships used in database.
50 Sura’s ➠ 12th Std  COMPUTER SCIENCE  Question Papers

(OR)
(b) Explain about DML commands of SQL
38. (a)  Write a Python program to store and retrieve the following data in SQLite3.
Database Schema:
Field Type Size Constrain
Rollno INTEGER PRIMARY KEY
Sname VARCHAR 20
Gender CHAR 1
Average DECIMAL 5, 2
Data to be inserted as tuple :
Rollno Sname Gender Average
1001 KULOTHUNGAN M 75.2
1002 KUNDAVAI F 95.6
1003 RAJARAJAN M 80.6
1004 RAJENDRAN M 98.6
1005 AVVAI F 70.1
(OR)
(b) What are the key differences between Histogram and Bar graph?

ONE MARK ANSWERS

PART - I
1. (b) ()
2. (a) Pair
3. (a) Priori estimates
4. (c) Statement (3) Only
5. (a) (a)-(iv), (b)-(iii), (c)-(i), (d)-(ii)
6. (c) Tuples
7. (a) { }
8. (b) range()
9. (d) Methods
10. (b) one-to-many
11. (a) DDL
12. (b) skipinitialspace
13. (a) __name____
14. (c) Cursor
15. (b) Scatter


Sura’s ➠ 12th Std  COMPUTER SCIENCE  Question Papers  51

th Reg. No.
PTA Model question paper - 5
part - III
Time Allowed : 3.00 Hours] COMPUTER SCIENCE [Maximum Marks : 70

PART - I
Note : (i) Answer all the questions. 15×1=15
(ii) Choose the most appropriate answer from the given four alternatives and write the option code and the cor-
responding answer.
1. Which of the following algorithmic approach is similar to divide and conquer approach?
(a) Insertion sorting (b) Dynamic programming
(c) Selection searching (d) Bubble programming
2. ADT can be implemented using ________
(a) singly linked list (b) doubly linked list
(c) either A or B (d) neither A nor B
3. Which of the following is not the example of modules?
(a) procedures (b) subroutines
(c) class (d) functions
4. The floor division operator in Python:
(a) / (b) % (c) % % (d) //
5. The optional parameter of range() function in Python
(a) start (b) stop (c) step (d) slice
6. What will be the output of the following Python snippet?
c=5
def add():
c=c+5
print(c)
add()
(a) 5 (b)10 (c) 15 (d) Error
7. The formatting character is used to print exponential notation in upper case?
(a) %e (b) %E (c) %g (d) %n
8. Which is a mutable and unordered collection of elements without duplicates?
(a) List (b) Tuple
(c) Set (d) Dictionary
9. The class instantiation means :
(a) Creating a class (b) Creating a constructor
(c) Creating a Destructor (d) Creating an object
10. The symbol of project in relational algebra of DBMS :
(a) σ (b) П (c) ∩ (d) ∪
52 Sura’s ➠ 12th Std  COMPUTER SCIENCE  Question Papers

11. Match the following :


(a) DELETE - (i) DDL
(b) DROP - (ii) DQL
(c) SELECT - (iii) TCL
(d) COMMIT - (iv) DML
(a) a-iv, b-iii, c-ii, d-i (b) a-iv, b-i, c-ii, d-iii
(c) a-i, b-iv, c-iii, d-ii (d) a-i, b-iii, c-iv, d-i
12. To read a CSV file into a dictionary can be done by using ________
(a) Reader (b) DictReader
(c) CSVReader (d) FileReader
13. ________ is a software design technique to split your code into separate parts.
(a) Object Oriented Programming (b) Dynamic programming
(c) Procedural Oriented Programming (d) Modular Programming
14. Which of the following clause avoid the duplicates in SQL?
(a) DISTINCT (b) HAVING
(c) WHERE (d) GROUPBY
15. Which of the following matplotlib function is used to draw line chart?
(a) pie() (b) line()
(c) bar() (d) plot()
PART - II
 nswer any six questions. Question No. 24 is compulsory.
A 6 × 2 = 12
16. What is impure function?
17. What is mapping?
18. What are the different operators that can be used in Python?
19. Write the expansion of (i) SWIG (ii) MinGW
20. What is the positive and negative subscript value of the character ‘h’ in string ‘school’?
21. What will be the output of the following snippet?
alpha=list(range(65, 70))
for x in alpha:
print(chr(x), end=’\t’)
22. Write the syntax of class instantiation.
23. What is the difference between SQL and MYSQL?
24. How to set the limit for recursive function? Given an example.
PART - III
Answer any six questions. Question No. 33 is compulsory. 6 × 3 = 18
25. Identify which of the followings are constructors and selectors?
(a) N1: =number( )
Sura’s ➠ 12th Std  COMPUTER SCIENCE  Question Papers  53

(b) accetnum(n1)
(c) displaynum(n1)
(d) eval(a/b)
(e) x,y: = makeslope (m), makeslope(n)
(f) display()
26. What are the different phases of analysis and performance evaluation of an algorithm?
27. Write a Python program to print the following pattern.
A
AB
ABC
ABCD
ABCDE
28. How index value allocated to each character of a string in Python?
29. Write any three uses of data visualization.
30. Explain Cartesian product with a suitable example.
31. What is the difference between the write mode and append mode?
32. Read the following details. Based on that write a python script to display department wise records
Database name : [Link]
Table name : Employee
Columns in the table : Eno, EmpName, Esal, Dept
33. Write a simple python program with list of five marks and print the sum of all the marks using while loop.
PART - IV
Answer all the questions: 5 × 5 = 25
34. (a) Identify in the following program
let rec gcd a b :=
if b <> 0 then gcd b (a mod b) else return a
i) Name of the function
ii) Identify the statement which tells it is a recursive function
iii) Name of the argument variable
iv) Statement which invoke the function recursively
v) Statement which terminates the recursion
(OR)
(b) Explain the characteristics of an algorithm.
35. (a) Explain recursive function in Python with an example.
(OR)
(b) Write a note on find ( ) function in Python.
36. (a) What will be the output of the following Python program?
A={x*3 for x in range (1,6)}
B={y**2 for y in range (1,10, 2)}
Print(A)
54 Sura’s ➠ 12th Std  COMPUTER SCIENCE  Question Papers

Print(B)
Print(A|B)
Print(A-B)
Print(A&B)
Print(A˄B)
(OR)
(b)  Explain the characteristics of DBMS.
37. (a)  Write the rules to be followed to format the data in a CSV file.
(OR)
(b) Write the syntax for getopt() and explain its arguments and return values.
38. (a)  What is the use of HAVING clause? Give an example python script.
(OR)
(b) Explain the various buttons in a matplotlib window.

ONE MARK ANSWERS

PART - I
1. (b) Dynamic programming
2. (a) singly linked list
3. (c) class
4. (d) //
5. (d) slice
6. (d) Error
7. (b) %E
8. (c) Set
9. (d) Creating an object
10. (b) П
11. (b) a-iv, b-i, c-ii, d-iii
12. (b) DictReader
13. (b) Modular programming
14. (a) DISTINCT
15. (b) line()

Sura’s ➠ 12th Std  COMPUTER SCIENCE  Question Papers  55

th Reg. No.
PTA Model question paper - 6
part - III
Time Allowed : 3.00 Hours] COMPUTER SCIENCE [Maximum Marks : 70

PART - I
Note : (i) Answer all the questions. 15×1=15
(ii) Choose the most appropriate answer from the given four alternatives and write the option code and the cor-
responding answer.
1. Which of the following is a distinct syntactic block?
(a) Subroutines (b) Function
(c) Definition (d) Modules
2. Which of the following does not allow to name the various parts of a multi-item object?
(a) Tuples (b) Lists
(c) Classes (d) quadrats
3. The members that are accessible from within the class and are also available to its sub-classes is called
(a) Public members (b) Protected members
(c) Secured members (d) Private members
4. The word comes from the name of a Persian mathematician Abu Ja’far Mohammed ibn-i Musa al Khowarizmi is
called?
(a) Flowchart (b) Flow
(c) Algorithm (d) Syntax
5. Which of the following character is used to give comments in Python Program?
(a) # (b) & (c) @ (d) $
6. Which of the following is not a jump keyword?
(a) pass (b) continue
(c) skip (d) break
7. Which of the following is not an argument type?
(a) Required arguments (b) Default arguments
(c) Keyword arguments (d) Fixed length arguments
8. What will be the output of the following snippet?
str1= “COMPUTER”
print(str1[::2])
(a) ER (b) CO (c) OPTR (d) CMUE
9. How may elements are in the list given below?
MyList=[78, 91, 34, [32, 61, 85], 65]
(a) 3 (b) 4 (c) 5 (d) 7
10. Which of the following class declaration is correct?
(a) class class_name (b) class class_name<>
(c) class class_name: (d) class class_name[ ]
56 Sura’s ➠ 12th Std  COMPUTER SCIENCE  Question Papers

11. A tuple is also known as ______ in database.


(a) table (b) row
(c) attribute (d) field
12. Pick odd one :
(a) CREATE (b) UPDATE
(c) ALTER (d) DROP
13. What does _ name_contains?
(a) C++ filename (b) main() name
(c) Python filename (d) OS module name
14. Which of the following is called the master table?
(a) sqlite_master (b) sql_master
(c) main_master (d) master_main
15. In Line Chart or Line Graph displays information as a series of data points called ______.
(a) Markers (b) Points
(c) Dots (d) Lines
PART - II
Answer any six questions. Question No. 24 is compulsory. 6 × 2 = 12
16. What are the different operators that can be used in Python?
17. List the control structures in Python.
18. What is base condition in recursive function?
19. What is Pip?
20. What are the collection data types available in Python?
21. What is instantiation?
22. Differentiate Unique and Primary Key constraint.
23. What is Excel?
24. Write the general format of slicing operation?
PART - III
Answer any six questions. Question No. 33 is compulsory. 6 × 3 = 18
25. Differentiate Pure and impure function.
26. What is a List? Why List can be called as Pairs?
27. Define Global scope with an example.
28. Identify the module, operator, definition name for the following.
[Link]()
29. Write a note on string formatting operators of Python.
30. Consider the following tuple declaration :
>>>Mytuple=tuple([x**2 for x in range (2, 11, 2)])
What will be the output of the following print statements?
(i) >>>print(Mytuple[2:3])
(ii) >>>print(Mytuple[3:])
(iii) >>>print(Mytuple[:])
Sura’s ➠ 12th Std  COMPUTER SCIENCE  Question Papers  57

31. Describe the database structure.


32. What are the factors that measure the execution time of an algorithm?
33. Read the following details. Based on that write a python script to display records in descending order of Eno.
Database name : [Link]
Table name : Employee
Columns in the table : Eno, EmpName, Esal, Dept
PART - IV
Answer all the questions: 5 × 5 = 25
34. (a) What are the Characteristics of Modules?
(OR)
(b) Explain the Bubble sort algorithm with example.
35. (a) Explain briefly about jump statements in Python.
(OR)
(b) Explain the following built-in functions.
(i) id() (ii) chr() (iii) round() (iv) type() (v) pow()
36. (a) Explain about slicing and slicing with stride.
(OR)
(b)  How would you access elements of a list?
37. (a)  Explain the components of DBMS.
(OR)
(b) What are the functions performed by DDL?
38. (a)  Write a note on aggregate functions of SQL.
(OR)
(b) Explain about the types of pyplots using in Matplotlib.
ONE MARK ANSWERS

PART - I
1. (c) Definition
2. (b) Lists
3. (b) Protected members
4. (c) Algorithm
5. (a) #
6. (c) skip
7. (d) Fixed length arguments
8. (c) OPTR
9. (d) 7
10. (c) class class_name:
11. (b) row
12. (b) UPDATE
13. (c) Python filename
14. (a) sqlite_master
15. (a) Markers


You might also like