COMPUTER SCIENCE – Code No.
083
Sample Question Paper (Modified Version)
Class XII – Session 2025-26
Time Allowed: 3 Hours Maximum Marks: 70
General Instructions:
This question paper contains 37 questions.
All questions are compulsory. However, internal choices have been provided in some
questions.
The paper is divided into 5 Sections – A, B, C, D, and E.
Section A: 21 questions × 1 mark = 21
Section B: 7 questions × 2 marks = 14
Section C: 3 questions × 3 marks = 9
Section D: 4 questions × 4 marks = 16
Section E: 2 questions × 5 marks = 10
All programming questions must be answered in Python.
SECTION – A (21 × 1 = 21 Marks)
1. 1. Using the statistics module, the output of the below statements will be 25:
import statistics
[Link]([20, 10, 30, 40])
2. 2. Output of the code:
L = ['Hello', 'Python', 'World']
print(L[0][1] + L[2][-1])
3. 3. Evaluate: print(15>10 and 25<20 or not 40>35)
4. 4. In SQL, which type of Join can contain duplicate columns?
5. 5. s = 'Artificial'
print(s[-2::-3])
SECTION – B (7 × 2 = 14 Marks)
6. 22. Explain mutable and immutable data types in Python with examples.
OR
Explain break and pass statements with examples.
7. 23. Correct and underline the errors in:
define remove_mid(str):
if len(str)<=2:
return str
new_str = str[0] + str[2:]
return new_str
Print('New string:', remove_mid('School'))
SECTION – C (3 × 3 = 9 Marks)
8. 29. Write a Python function that counts how many lines in a text file [Link] contain
the word 'Computer'.
OR
Display all lines of [Link] that end with '.com'.
SECTION – D (4 × 4 = 16 Marks)
9. 32. Write SQL queries for the table ORDERS:
I. Display total amount per product where total exceeds 5000.
II. Display all records sorted by CustomerName (ascending).
SECTION – E (2 × 5 = 10 Marks)
10. 36. Write Python functions to:
I. Input book records and save them to a binary file.
II. Update price of books where price < 300 to 350.