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

TAMIL NADU STATE BOARD CLASS 12 COMPUTER SCIENCE 2026

2026 · 37 questions · First 10 Solutions Free
Questions 1–10 have full step-by-step solutions visible. Sign in to unlock all 37 →
Q1 mcq 1 mark
The function which cause side effects to the arguments passed are called __________.
a.
Dynamic function
b.
Impure function Correct Answer
c.
Pure function
d.
Partial function
Step-by-Step AI Explanation
Verified Method
The correct answer is (b) Impure function. An impure function may produce side effects or depend on external state, so the result is not determined only by its input arguments. A pure function, on the other hand, does not cause side effects and always gives the same output for the same inputs.
Q2 mcq 1 mark
The datatype whose representation is known are called __________.
a.
Concrete datatype Correct Answer
b.
Built in datatype
c.
Abstract datatype
d.
Derived datatype
Step-by-Step AI Explanation
Verified Method
The correct answer is (a) Concrete datatype. Concrete datatypes are datatypes whose representation is known. In contrast, abstract datatypes hide their internal representation and expose only operations.
Q3 mcq 1 mark
Which members are accessible from outside the class ?
a.
Secured members
b.
Public members Correct Answer
c.
Private members
d.
Protected members
Step-by-Step AI Explanation
Verified Method
The correct answer is (b) Public members. Public members of a class are accessible from outside the class. Private members are accessible only within the class, and protected members are accessible only in the class and its derived classes.
Q4 mcq 1 mark
Two main measures for the efficiency of an algorithm are __________.
a.
Time and Space Correct Answer
b.
Processor and Memory
c.
Complexity and Time
d.
Data and Space
Step-by-Step AI Explanation
Verified Method
The correct answer is (a) Time and Space. The efficiency of an algorithm is mainly measured by its time complexity and space complexity. Time measures how long the algorithm takes, and space measures the memory used.
Q5 mcq 1 mark
Which key is used to execute Python Script ?
a.
F5 Correct Answer
b.
F1
c.
F10
d.
F2
Step-by-Step AI Explanation
Verified Method
The correct answer is (a) F5. In Python IDEs such as IDLE, the F5 key is used to execute the Python script.
Q6 mcq 1 mark
Which of the following is the output of the given Python code if the value of $a$ is 52 ? x='even' if $a\%2==0$ else 'odd' print(x)
a.
error
b.
even Correct Answer
c.
no output
d.
odd
Step-by-Step AI Explanation
Verified Method
The correct answer is (b) even. Since $a = 52$, the condition $a\%2==0$ is true because 52 is divisible by 2. So the expression assigns 'even' to x, and print(x) displays even.
Q7 mcq 1 mark
A function which calls itself is called as :
a.
Lambda
b.
Built in
c.
Return
d.
Recursion Correct Answer
Step-by-Step AI Explanation
Verified Method
The correct answer is (d) Recursion. A function that calls itself is called a recursive function, and the process is known as recursion.
Q8 mcq 1 mark
Which of the following operator is used for concatenation ?
a.
*
b.
1
c.
=
d.
& Correct Answer
Step-by-Step AI Explanation
Verified Method
The correct answer is (d) &. In many programming contexts, the ampersand symbol is used for concatenation in this question's options. The other choices are not concatenation operators: * means multiplication, 1 is a number, and = is assignment.
Q9 mcq 1 mark
If mylist=[10, 20, 30, 40] then mylist.append(35) will result :
a.
[10, 35, 20, 30, 40]
b.
[10, 20, 30, 40, 35] Correct Answer
c.
[35, 10, 20, 30, 40]
d.
[10, 20, 30, 35, 40]
Step-by-Step AI Explanation
Verified Method
The correct answer is (b) [10, 20, 30, 40, 35]. In Python, append(35) adds the new element to the end of the list. It does not insert it in the middle or remove any existing element.
Q10 mcq 1 mark
Which of the following is the private class variable ?
a.
$$num
b.
__num Correct Answer
c.
++num
d.
##num
Step-by-Step AI Explanation
Verified Method
The correct answer is (b) __num. In Python, a variable name beginning with double underscores is treated as a private class variable by convention. The other options are not valid Python private-variable indicators.
🎉 10 Free Sample Solutions Completed

Unlock All 37 Questions & Solutions

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

Q11 mcq 1 mark
Who is called Father of Relational Database from the following ?
a.
Edgar Frank Codd
b.
Chris Date
c.
Chand
d.
Hugh Darween
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
__________ command is used to change the structure of the table.
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
The expansion of CRLF is :
a.
Control Router and Line Feed
b.
Carriage Return and Line Feed
c.
Control Return and Line Feed
d.
Carriage Return and Form Feed
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
A framework for interfacing Python and C++ is :
a.
Cython
b.
Ctypes
c.
Boost
d.
SWIG
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
__________ function returns the largest value of the selected column.
a.
HIGH( )
b.
MAX( )
c.
MAXIMUM( )
d.
LARGE( )
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 subroutine ?
Correct Answer & Step-by-Step Solution Locked

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

Q17 short answer
How Python represents the Private and Protected Access specifiers ?
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 ? a=10 b=3 print(a/b) print(a%b) print(a**b) print(a//b)
Correct Answer & Step-by-Step Solution Locked

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

Q19 short answer
Evaluate the following function and write the output. import math x=26.72 y=64 print(math.floor(x)) print(math.ceil(x)) print(math.sqrt(y)) print(round(x,1))
Correct Answer & Step-by-Step Solution Locked

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

Q21 short answer
What is data consistency ?
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 next( ) function ?
Correct Answer & Step-by-Step Solution Locked

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

Q23 short answer
Mention the users who uses the database.
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 will be the output of following Python code ? a=[x**2 for x in range(1, 5)] print(s) print(sum(s))
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 different ways to access the elements of a list ? Give 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
What do you understand by Dynamic Programming ?
Correct Answer & Step-by-Step Solution Locked

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

Q27 short answer
Write a program to display all 3 digit odd numbers.
Correct Answer & Step-by-Step Solution Locked

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

Q28 short answer
Write a short note about the following with suitable example. (a)capitalize( ) (b)swapcase( )
Correct Answer & Step-by-Step Solution Locked

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

Q29 short answer
How to define constructor and destructor in Python ?
Correct Answer & Step-by-Step Solution Locked

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

Q30 short answer
Differentiate PYTHON and C++.
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 a SQL statement to modify the student table structure by adding a new field.
Correct Answer & Step-by-Step Solution Locked

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

Q32 short answer
Write any three key differences between Histogram and Bar Graph.
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 given Python code ? a=''Computer'' b=''Science'' x=a[:3]+b[len(b)-2:] print(x.upper())
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)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 variables. (iv)Statement which invoke the function recursively. (v)Statement which terminates the recursion. OR (b)Explain the different ways to delete elements from the list in Python with example.
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 Linear Search Algorithm. OR (b)Write a Python program to calculate factorial of the given number using for loop.
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)Describe in detail the procedure of script mode programming in Python. OR (b)Explain the scope of variables in Python with example.
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)Write the output of the following Python statements. strl=''Welcome to Python Programming '' print(strl[11:16]) print(strl[11:]) print(strl[:7]) print(strl[::3]) print(strl[::-5]) OR (b)Explai
Correct Answer & Step-by-Step Solution Locked

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

Q38 short answer
Consider the following student table. Write SQL commands for the questions (i) to (v). Rollno Name Gender Average 101 ANU Female 98 102 BALAN Male 95 103 RAVI Male 82 104 DEVI Female 89 105 MANI Male 75 (i)To display all details of all students in descending order of name. (ii)To add details of a new student. (iii)To display all student details whose Average is between 70 and 90. (iv)To remove the student detail whose Rollno=103. (v)To display the details of female students. OR Write the Matplotlib functions for the following statements. (i)To label the x axis. (ii)To label the y axis. (iii)To assign the plot’s title. (iv)To display the plot. (v)To invoke the default legend.
Correct Answer & Step-by-Step Solution Locked

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