← Class 12 Board Exam (HSC)
Tamil Nadu State Board · Computer Science

TAMIL NADU STATE BOARD CLASS 12 COMPUTER SCIENCE 2025

2025 · 38 questions · First 10 Solutions Free
Questions 1–10 have full step-by-step solutions visible. Sign in to unlock all 38 →
Q1 mcq 1 mark
Which of the following is a distinct syntactic block ?
a.
Subroutines
b.
Function
c.
Definition
d.
Modules Correct Answer
Step-by-Step AI Explanation
Verified Method
Modules are a distinct syntactic block because they group related definitions and statements into a separate unit. Subroutines and functions are blocks inside programs, but in Python a module itself is treated as a separate syntactic unit. Definition is not a specific block type.
Q2 mcq 1 mark
Which of the following functions that build the abstract data type ?
a.
Constructors Correct Answer
b.
recursive
c.
Destructors
d.
Nested
Step-by-Step AI Explanation
Verified Method
Constructors are functions that build or initialize an abstract data type (ADT) by creating its instances and setting up their initial state. Recursive, destructors, and nested are not the functions specifically used to build an ADT.
Q3 mcq 1 mark
The __________ rule is used to decide the order in which the scopes are to be searched.
a.
LBEG
b.
LEGB Correct Answer
c.
GEBL
d.
GBLE
Step-by-Step AI Explanation
Verified Method
The LEGB rule is used to decide the order in which scopes are searched in Python: Local, Enclosing, Global, and Built-in. The other options are not standard scope-search rules.
Q4 mcq 1 mark
Binary search is also called as __________.
a.
Random search
b.
Linear search
c.
Half-interval search Correct Answer
d.
Sequential search
Step-by-Step AI Explanation
Verified Method
Binary search is also called half-interval search because it repeatedly divides the search interval into two halves to locate the required element. It is not random, linear, or sequential search.
Q5 mcq 1 mark
Which operator is also called as conditional operator ?
a.
Logical
b.
Ternary Correct Answer
c.
Assignment
d.
Relational
Step-by-Step AI Explanation
Verified Method
The ternary operator is also called the conditional operator because it evaluates one of two expressions based on a condition. Logical, assignment, and relational operators are different categories of operators.
Q6 mcq 1 mark
Which of the following is known as definite loop ?
a.
for Correct Answer
b.
do...while
c.
if...else
d.
while
Step-by-Step AI Explanation
Verified Method
The for loop is known as a definite loop because the number of iterations is known in advance. The do...while and while loops are generally indefinite loops, and if...else is a selection statement, not a loop.
Q7 mcq 1 mark
Which of the following keyword is used to exit a function block ?
a.
finally
b.
define
c.
def
d.
return Correct Answer
Step-by-Step AI Explanation
Verified Method
The return keyword is used to exit from a function block and optionally send a value back to the caller. finally, define, and def do not exit a function block.
Q8 mcq 1 mark
The subscript of a string may be :
a.
positive or negative numbers Correct Answer
b.
positive numbers
c.
both positive and negative numbers
d.
negative numbers
Step-by-Step AI Explanation
Verified Method
The subscript of a string may be positive or negative. Positive indexing starts from the beginning of the string, while negative indexing starts from the end. Hence both positive and negative numbers are allowed.
Q9 mcq 1 mark
Which of the following is the output of the given Python code ? str1 = "Computer Science" print(str1[::-1])
a.
ecneicS retupmoC Correct Answer
b.
Computer Science
c.
eniS eumC
d.
Cmue Sine
Step-by-Step AI Explanation
Verified Method
The code uses slicing with a step of -1: `str1[::-1]`. This reverses the string, so `Computer Science` becomes `ecneicS retupmoC`. Hence, option (a) is correct. The other options are not the reversed output.
Q10 mcq 1 mark
Class members are accessed through which operator ?
a.
#
b.
&
c.
%
d.
. Correct Answer
Step-by-Step AI Explanation
Verified Method
Class members are accessed through the dot operator `.`. It is used to access methods and attributes of a class or object, for example `obj.method()`. So, option (d) is correct.
🎉 10 Free Sample Solutions Completed

Unlock All 38 Questions & Solutions

Sign up free in seconds to unlock step-by-step AI answers for the remaining 28 questions.

Q11 mcq 1 mark
Who developed ER model ?
a.
Chend
b.
Chen
c.
Chand
d.
E F Codd
Correct Answer & Step-by-Step Solution Locked

Sign in free to reveal the correct answer and AI explanation for this question.

Q12 mcq 1 mark
Queries can be generated using :
a.
MODIFY
b.
SELECT
c.
ALTER
d.
ORDER BY
Correct Answer & Step-by-Step Solution Locked

Sign in free to reveal the correct answer and AI explanation for this question.

Q13 mcq 1 mark
Making some changes in the data of the existing file or adding more data is called :
a.
Modification
b.
Editing
c.
Alteration
d.
Appending
Correct Answer & Step-by-Step Solution Locked

Sign in free to reveal the correct answer and AI explanation for this question.

Q14 mcq 1 mark
The module which allows to interface with the Windows operating system is :
a.
csv module
b.
OS module
c.
getopt module
d.
sys module
Correct Answer & Step-by-Step Solution Locked

Sign in free to reveal the correct answer and AI explanation for this question.

Q15 mcq 1 mark
Which of the following keyword avoids the duplicate ?
a.
Where
b.
Distinct
c.
GroupBy
d.
Remove
Correct Answer & Step-by-Step Solution Locked

Sign in free to reveal the correct answer and AI explanation for this question.

Q16 short answer
What is a pair ? Give an example.
Correct Answer & Step-by-Step Solution Locked

Sign in free to reveal the correct answer and AI explanation for this question.

Q17 short answer
What is sorting ?
Correct Answer & Step-by-Step Solution Locked

Sign in free to reveal the correct answer and AI explanation for this question.

Q18 short answer
What is the output of the following Python code ? for x in range(5,20,5): print(x, end = ' ')
Correct Answer & Step-by-Step Solution Locked

Sign in free to reveal the correct answer and AI explanation for this question.

Q19 short answer
What is Slicing ?
Correct Answer & Step-by-Step Solution Locked

Sign in free to reveal the correct answer and AI explanation for this question.

Q20 short answer
What is the purpose of Destructor ?
Correct Answer & Step-by-Step Solution Locked

Sign in free to reveal the correct answer and AI explanation for this question.

Q21 short answer 2 marks
Which component of SQL lets insert values in tables and which lets to create a table ?
Correct Answer & Step-by-Step Solution Locked

Sign in free to reveal the correct answer and AI explanation for this question.

Q22 short answer
What is the use of cd command ? Give an example.
Correct Answer & Step-by-Step Solution Locked

Sign in free to reveal the correct answer and AI explanation for this question.

Q23 short answer
How will you install matplotlib ?
Correct Answer & Step-by-Step Solution Locked

Sign in free to reveal the correct answer and AI explanation for this question.

Q24 short answer
What is the output of the following Python code ? str1=‘WELCOME’ print(str1.islower( )) print(str1.lower( ))
Correct Answer & Step-by-Step Solution Locked

Sign in free to reveal the correct answer and AI explanation for this question.

Q25 short answer
What are the side effects of Impure function ? Give an example.
Correct Answer & Step-by-Step Solution Locked

Sign in free to reveal the correct answer and AI explanation for this question.

Q26 short answer
Define Global scope with an example.
Correct Answer & Step-by-Step Solution Locked

Sign in free to reveal the correct answer and AI explanation for this question.

Q27 short answer
What are the assignment operators that can be used in Python ?
Correct Answer & Step-by-Step Solution Locked

Sign in free to reveal the correct answer and AI explanation for this question.

Q28 short answer
Differentiate ceil( ) and floor() functions.
Correct Answer & Step-by-Step Solution Locked

Sign in free to reveal the correct answer and AI explanation for this question.

Q29 short answer
Write the syntax of the following Python list functions. (i)remove( ) (ii)pop( ) (iii)clear( )
Correct Answer & Step-by-Step Solution Locked

Sign in free to reveal the correct answer and AI explanation for this question.

Q30 short answer
Explain Cartesian product with a suitable example.
Correct Answer & Step-by-Step Solution Locked

Sign in free to reveal the correct answer and AI explanation for this question.

Q31 short answer
Write the difference between reader( ) and DictReader( ).
Correct Answer & Step-by-Step Solution Locked

Sign in free to reveal the correct answer and AI explanation for this question.

Q32 short answer
Mention the difference between fetchone( ) and fetchmany( ).
Correct Answer & Step-by-Step Solution Locked

Sign in free to reveal the correct answer and AI explanation for this question.

Q33 short answer
What will be the output of the following Python code ? squares=[ ] for x in range(1,6): s=x**2 squares.append(s) print(squares)
Correct Answer & Step-by-Step Solution Locked

Sign in free to reveal the correct answer and AI explanation for this question.

Q34 long answer
(a)Explain pure and impure functions with an example. OR (b)Explain the different types of data model.
Correct Answer & Step-by-Step Solution Locked

Sign in free to reveal the correct answer and AI explanation for this question.

Q35 long answer
(a)Explain the different types of operators in Python. OR (b)Write the different types of constraints and their functions.
Correct Answer & Step-by-Step Solution Locked

Sign in free to reveal the correct answer and AI explanation for this question.

Q36 long answer
(a)Explain While loop in Python with an example. OR (b)Tabulate the different Python file modes with description.
Correct Answer & Step-by-Step Solution Locked

Sign in free to reveal the correct answer and AI explanation for this question.

Q37 long answer
(a)Explain the recursive function with an example. OR (b)What is the purpose of sys, os, getopt, modules in Python ? Explain.
Correct Answer & Step-by-Step Solution Locked

Sign in free to reveal the correct answer and AI explanation for this question.

Q38 long answer
(a)Write the output of the following. A={1,2,3,4,5} B={4,5,6,7,8} print(A|B) print(A&B) print(A-B) print(B-A) print(A^B) OR (b)Explain the following SQL aggregate functions with suitable Python statement with SQL query. (i)AVG( ) (ii)COUNT( ) (iii)SUM( ) (iv)MAX( ) (v)MIN( )
Correct Answer & Step-by-Step Solution Locked

Sign in free to reveal the correct answer and AI explanation for this question.