CBSESetWise.in

CBSE Class 12 Computer Science (083) Chapter-Wise PYQs

157 authentic 2022–2026 board questions & 8 chapter PDF booklets with official answer keys.

Class 12 Computer Science Chapter-Wise PYQs (8 Chapters)

Recent Computer Science PYQs

Q1 • CBSE 2026 • 1 Mark • Functions & Exception Handling (Chapter 1-3)

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) (2026) 1-Mark Board Question Q1

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2026 1 Mark PYQ Q1
Official CBSE Marking Scheme Solution

False. 74 is int; 74.0 is float.

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2026 1 Mark PYQ Q1 Official Solution
Q2 • CBSE 2026 • 1 Mark • Functions & Exception Handling (Chapter 1-3)

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) (2026) 1-Mark Board Question Q2

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2026 1 Mark PYQ Q2
Official CBSE Marking Scheme Solution

Option A — The truth.

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2026 1 Mark PYQ Q2 Official Solution
Q3 • CBSE 2026 • 1 Mark • Functions & Exception Handling (Chapter 1-3)

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) (2026) 1-Mark Board Question Q3

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2026 1 Mark PYQ Q3
Official CBSE Marking Scheme Solution

Option C — 3>1 and 3>2.

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2026 1 Mark PYQ Q3 Official Solution
Q4 • CBSE 2026 • 1 Mark • Functions & Exception Handling (Chapter 1-3)

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) (2026) 1-Mark Board Question Q4

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2026 1 Mark PYQ Q4
Official CBSE Marking Scheme Solution

Option A — ('War and Peace ', 'by', ' Leo Tolstoy').

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2026 1 Mark PYQ Q4 Official Solution
Q5 • CBSE 2026 • 1 Mark • Functions & Exception Handling (Chapter 1-3)

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) (2026) 1-Mark Board Question Q5

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2026 1 Mark PYQ Q5
Official CBSE Marking Scheme SolutionCBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2026 1 Mark PYQ Q5 Official Solution
Q6 • CBSE 2026 • 1 Mark • Functions & Exception Handling (Chapter 1-3)

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) (2026) 1-Mark Board Question Q6

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2026 1 Mark PYQ Q6
Official CBSE Marking Scheme Solution

The tuple contains the characters of "tuple"; appending t[2] as a one-element tuple adds 'p' at the end: ('t', 'u', 'p', 'l', 'e', 'p').

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2026 1 Mark PYQ Q6 Official Solution
Q7 • CBSE 2026 • 1 Mark • Functions & Exception Handling (Chapter 1-3)

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) (2026) 1-Mark Board Question Q7

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2026 1 Mark PYQ Q7
Official CBSE Marking Scheme Solution

Option B — a dictionary cannot contain two entries with the same key.

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2026 1 Mark PYQ Q7 Official Solution
Q8 • CBSE 2026 • 1 Mark • Functions & Exception Handling (Chapter 1-3)

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) (2026) 1-Mark Board Question Q8

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2026 1 Mark PYQ Q8
Official CBSE Marking Scheme Solution

Option B — L.pop(6), because valid indices for a six-element list are 0 to 5.

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2026 1 Mark PYQ Q8 Official Solution
Q20 • CBSE 2026 • 1 Mark • Functions & Exception Handling (Chapter 1-3)

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) (2026) 1-Mark Board Question Q20

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2026 1 Mark PYQ Q20
Official CBSE Marking Scheme Solution

Both A and R are true, and R explains A: a list cannot be concatenated directly with a string.

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2026 1 Mark PYQ Q20 Official Solution
Q23 • CBSE 2026 • 2 Marks • Functions & Exception Handling (Chapter 1-3)

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) (2026) 2-Mark Board Question Q23

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2026 2 Mark PYQ Q23
Official CBSE Marking Scheme Solution

L1 = sorted(L) ch.isalpha() # True if ch is an alphabetic character ch.isdigit() # True if ch is a digit

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2026 2 Mark PYQ Q23 Official Solution
Q24 • CBSE 2026 • 2 Marks • Functions & Exception Handling (Chapter 1-3)

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) (2026) 2-Mark Board Question Q24

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2026 2 Mark PYQ Q24
Official CBSE Marking Scheme Solution

'RNo' in D1 D1.setdefault('RNo', 12) D1.clear()

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2026 2 Mark PYQ Q24 Official Solution
Q25 • CBSE 2026 • 2 Marks • Functions & Exception Handling (Chapter 1-3)

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) (2026) 2-Mark Board Question Q25

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2026 2 Mark PYQ Q25
Official CBSE Marking Scheme Solution

Option D cannot be displayed; the loop runs 4 iterations.

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2026 2 Mark PYQ Q25 Official Solution
Q1 • CBSE 2025 • 1 Mark • Functions & Exception Handling (Chapter 1-3)

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) (2025) 1-Mark Board Question Q1

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2025 1 Mark PYQ Q1
Official CBSE Marking Scheme Solution

False — a list may contain elements of different data types.

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2025 1 Mark PYQ Q1 Official Solution
Q2 • CBSE 2025 • 1 Mark • Functions & Exception Handling (Chapter 1-3)

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) (2025) 1-Mark Board Question Q2

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2025 1 Mark PYQ Q2
Official CBSE Marking Scheme SolutionCBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2025 1 Mark PYQ Q2 Official Solution
Q3 • CBSE 2025 • 1 Mark • Functions & Exception Handling (Chapter 1-3)

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) (2025) 1-Mark Board Question Q3

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2025 1 Mark PYQ Q3
Official CBSE Marking Scheme Solution

Option D — ValueError, because uppercase "C" is not present in "Olympic2024".

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2025 1 Mark PYQ Q3 Official Solution
Q4 • CBSE 2025 • 1 Mark • Functions & Exception Handling (Chapter 1-3)

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) (2025) 1-Mark Board Question Q4

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2025 1 Mark PYQ Q4
Official CBSE Marking Scheme Solution

Option B — Break is a valid identifier; Python keywords are case-sensitive.

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2025 1 Mark PYQ Q4 Official Solution
Q5 • CBSE 2025 • 1 Mark • Functions & Exception Handling (Chapter 1-3)

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) (2025) 1-Mark Board Question Q5

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2025 1 Mark PYQ Q5
Official CBSE Marking Scheme Solution

Option B — positional argument follows a keyword argument.

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2025 1 Mark PYQ Q5 Official Solution
Q6 • CBSE 2025 • 1 Mark • Functions & Exception Handling (Chapter 1-3)

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) (2025) 1-Mark Board Question Q6

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2025 1 Mark PYQ Q6
Official CBSE Marking Scheme Solution

Option D — ['TAC', 'TIC'].

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2025 1 Mark PYQ Q6 Official Solution
Q7 • CBSE 2025 • 1 Mark • Functions & Exception Handling (Chapter 1-3)

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) (2025) 1-Mark Board Question Q7

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2025 1 Mark PYQ Q7
Official CBSE Marking Scheme SolutionCBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2025 1 Mark PYQ Q7 Official Solution
Q8 • CBSE 2025 • 1 Mark • Functions & Exception Handling (Chapter 1-3)

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) (2025) 1-Mark Board Question Q8

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2025 1 Mark PYQ Q8
Official CBSE Marking Scheme Solution

Option A — S01#S02# (dictionary iteration displays keys).

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2025 1 Mark PYQ Q8 Official Solution
Q12 • CBSE 2025 • 1 Mark • Functions & Exception Handling (Chapter 1-3)

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) (2025) 1-Mark Board Question Q12

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2025 1 Mark PYQ Q12
Official CBSE Marking Scheme Solution

Option A — dict().

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2025 1 Mark PYQ Q12 Official Solution
Q23 • CBSE 2025 • 2 Marks • Functions & Exception Handling (Chapter 1-3)

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) (2025) 2-Mark Board Question Q23

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2025 2 Mark PYQ Q23
Official CBSE Marking Scheme Solution

SyntaxError example: if x = 5: # assignment used where comparison is needed Implicit conversion example: 3 + 2.5 # evaluates to 5.5

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2025 2 Mark PYQ Q23 Official Solution
Q24 • CBSE 2025 • 2 Marks • Functions & Exception Handling (Chapter 1-3)

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) (2025) 2-Mark Board Question Q24

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2025 2 Mark PYQ Q24
Official CBSE Marking Scheme Solution

D['Raj'] len(D1) D1.update(D) D1.pop('Amit')

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2025 2 Mark PYQ Q24 Official Solution
Q25 • CBSE 2025 • 2 Marks • Functions & Exception Handling (Chapter 1-3)

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) (2025) 2-Mark Board Question Q25

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2025 2 Mark PYQ Q25
Official CBSE Marking Scheme Solution

Option A — Spade#Diamond# is possible; the first card index cannot be 0, so the other options are impossible.

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2025 2 Mark PYQ Q25 Official Solution
Q31 • CBSE 2025 • 3 Marks • Functions & Exception Handling (Chapter 1-3)

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) (2025) 3-Mark Board Question Q31

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2025 3 Mark PYQ Q31
Official CBSE Marking Scheme Solution

Output: The new string is: g0n2Ge (assuming the printed code uses count % 2 != 0, as shown in the scan). For the dictionary iteration question, append each key to L1 and its matching value to L2; the final lists contain [1, 2, 3]

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2025 3 Mark PYQ Q31 Official Solution