CBSESetWise.in

Class 12 Computer Science: Functions & Exception Handling PYQs (2022–2026)

Authentic CBSE board questions & official stepwise marking scheme solutions for Functions & Exception Handling (Chapter 1-3).

Functions & Exception Handling PYQs (2022–2026)

Comprehensive 26-page question booklet covering Python fundamentals, mutable/immutable data types, function definitions, parameter passing mechanisms (default, keyword, positional), scope hierarchy (LEGB), and exception handling (try-except-finally blocks).

Key Topics: Python Fundamentals & Tokens, User-Defined Functions (def), Default & Keyword Arguments, LEGB Scope Hierarchy, Exception Handling (try-except-finally)

Functions & Exception Handling Previous Year Questions & Solutions (65 Questions)

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
Q3 • CBSE 2024 • 1 Mark • Functions & Exception Handling (Chapter 1-3)

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

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

Option C — 0.0 (evaluating the expression shown in the scan).

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

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

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

Option A — YELLOW#RED# is the only possible listed output.

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

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

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

Option D — g = dict{} is invalid syntax.

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

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

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

Option A — MISS#SIPPI.

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

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

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

Option C — print("15" + 3) raises TypeError.

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2024 1 Mark PYQ Q9 Official Solution
Q10 • CBSE 2024 • 1 Mark • Functions & Exception Handling (Chapter 1-3)

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

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

Option B — ['Presidency@2023'].

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2024 1 Mark PYQ Q10 Official Solution
Q18 • CBSE 2024 • 1 Mark • Functions & Exception Handling (Chapter 1-3)

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

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

Both assertion and reason are true; the reason explains why "HELLO".sort() raises an error.

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2024 1 Mark PYQ Q18 Official Solution
Q22 • CBSE 2024 • 2 Marks • Functions & Exception Handling (Chapter 1-3)

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

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

HIMALAYA#8 and ALPS#4, each on a separate line.

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

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

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

Students.pop("NISHA") message.count("is") # OR: subject = list(subject); subject.pop()

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

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

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

Racecar prints R*A*C*E*C*A*R*; Car prints C#a#r#; Radar prints R*A*D*A*R*, each on its own line.

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2024 3 Mark PYQ Q26 Official Solution
Q1 • CBSE 2023 • 1 Mark • Functions & Exception Handling (Chapter 1-3)

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

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

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

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

Option B — return.

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

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

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

Option B — Tup.insert(2,3) fails because tuples do not have an insert method.

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

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

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

Option A — True.

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

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

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

The result of partitioning at the first space is ('Amrit', ' ', 'Mahotsav @ 75').

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

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

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

Option A — sort().

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

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

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

Option B — != is a comparison operator that returns True or False.

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

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

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

Option D — Statements 2 and 4 raise errors.

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2023 1 Mark PYQ Q9 Official Solution
Q14 • CBSE 2023 • 1 Mark • Functions & Exception Handling (Chapter 1-3)

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

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

Option B — 8.0 (evaluating 4 + 3*5/3 - 5%2).

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2023 1 Mark PYQ Q14 Official Solution
Q15 • CBSE 2023 • 1 Mark • Functions & Exception Handling (Chapter 1-3)

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

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

Option B — sum().

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2023 1 Mark PYQ Q15 Official Solution
Q21 • CBSE 2023 • 2 Marks • Functions & Exception Handling (Chapter 1-3)

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

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

['Rajat', 'Rajan', 'Ashish']. 1.

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2023 2 Mark PYQ Q21 Official Solution
Q9 • CBSE 2026 • 1 Mark • Functions & Exception Handling (Chapter 1-3)

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

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

Option C — 3-None (the function prints 3- and implicitly returns None).

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

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

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

Positional parameters receive arguments by position. Default parameters use a supplied default when an argument is omitted. Example: def f(a, b=10):

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

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

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

def CountVowels(s): count = 0 for ch in s: if ch in "aeiouAEIOU": count += 1 return count

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

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

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

Output list: ['4', '2', '-', 'd', 'l', 'o'] (based on the scanned loop over given[1:-1]). Output: 1-6-10-13-15-16-.

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

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

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

Option A — 25$15 (the parameter changes locally; global N remains 15).

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

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

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

return ends the function call and sends a value back to the caller; e.g. def add(a,b): return a+b.

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

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

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

def Sum(N): S = 0 for I in range(1, N + 1): S += I return S print(Sum(10)) # 55

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

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

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

False — positional parameters must be placed before default parameters.

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

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

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2024 1 Mark PYQ Q12
Official CBSE Marking Scheme SolutionCBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2024 1 Mark PYQ Q12 Official Solution
Q20 • CBSE 2024 • 2 Marks • Functions & Exception Handling (Chapter 1-3)

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

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

def EvenOdd(): for i in range(5): num = int(input("Enter a number: ")) if num % 2 == 0: print("Even") else: print("Odd") EvenOdd()

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

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

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

Use the supplied grading bands on each student's mean; the example output is AMIT - B, NAGMA - C, DAVID - A. def Puzzle(W, N): return "".join("_" if (i + 1) % N == 0 else ch for i, ch in enumerate(W))

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

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

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

Output lines: 300 # 100 300 @ 200 210 # 200 300 @ 210

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2024 2 Mark PYQ Q25 Official Solution
Q17 • CBSE 2023 • 1 Mark • Functions & Exception Handling (Chapter 1-3)

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

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

Both assertion and reason are true; import must occur before the module function is used.

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2023 1 Mark PYQ Q17 Official Solution
Q19 • CBSE 2023 • 2 Marks • Functions & Exception Handling (Chapter 1-3)

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

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

def max_num(L): max_val = L[0] for a in L: if a > max_val: max_val = a return max_val

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

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

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

['CS', 'HINDIHINDI', 'PHYSICSPHYSICS', 'CHEMISTRYCHEMISTRY', 'MATHSMATHS']. 65#70@.

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

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

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

def EOReplace(L): for i in range(len(L)): if L[i] % 2 == 0: L[i] += 1 else: L[i] -= 1 # Example result: [11, 21, 31, 41, 34, 54]

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2023 3 Mark PYQ Q29 Official Solution
Q11 • CBSE 2026 • 1 Mark • Functions & Exception Handling (Chapter 1-3)

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

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

False — try/except/finally handles runtime exceptions, not logical errors.

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

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

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

Option D — ERROR#OVER (the except block handles the type error, then finally runs).

CBSE Class 12 Functions & Exception Handling (Chapter 1-3) 2025 1 Mark PYQ Q11 Official Solution
Q13 • CBSE 2024 • 1 Mark • Functions & Exception Handling (Chapter 1-3)

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

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

False — a bare except clause is allowed, although naming an exception is often preferable.

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

Other Computer Science Chapters

Functions & Exception Handling • Text Files • Binary Files • CSV Files • Stack • Computer Networks • Database Concepts & SQL • Python-MySQL Connectivity