CBSE Class 12 Computer Science (083) Paper 1 Sample 2023
If you can master the patterns in this paper, you'll spot the hidden marks in any CBSE Class 12 Computer Science exam — and know exactly which Python concept is being tested before you even finish reading the question. This sample covers the core pillars of the syllabus: writing and tracing Python functions (including recursion), reading and writing files to solve real problems, and working with SQL to query and manipulate databases. You'll see the exact mix of multiple-choice, true/false, and fill-in-the-blank questions that appear on the real board papers. By the time you finish, you'll understand how to approach function design, spot off-by-one errors, and convert English problem statements into SQL WHERE clauses without hesitation.
Questions in this quiz
Answers hidden — play to find out.
- Question 1
What will be the output of the following Python code?
def mystery(n): if n <= 1: return 1 else: return n * mystery(n - 1)
print(mystery(5))
- Question 2
Which of the following correctly defines a function that accepts a list and returns the sum of all even numbers in the list?
- Question 3
In Python, when you pass a list to a function and modify it inside the function, what happens to the original list?
- Question 4
What is the output of the following code?
def func(x, y=10): return x + y
print(func(5))
- Question 5
Which file mode allows you to append data to a file without erasing existing content?
- Question 6
What will be the result of the following file handling code?
with open('data.txt', 'r') as f: lines = f.readlines() print(len(lines))
- Question 7
To write data to a binary file in Python, which of the following is the correct approach?
- Question 8
Which SQL keyword is used to retrieve data from a table?
- Question 9
What will the following SQL query return?
SELECT * FROM Students WHERE Age > 18;
- Question 10
Which SQL clause is used to add new records to a table?
- Question 11
Given a table Employees with columns (EmpID, Name, Department, Salary), which query will return the names of all employees whose salary is between 30,000 and 50,000?
- Question 12
What is the purpose of the PRIMARY KEY constraint in SQL?
- Question 13
Which SQL statement is used to remove records from a table?