Python Revision & Functions: Class 12 Previous Year Questions
Every CBSE board exam question on Python Revision & Functions (Class 12 Computer Science (CS)) from 2022 to 2026, with the years it was asked and the official marking-scheme answer in the free app.
Key facts
- Weightage: about 24.5 marks per board paper on average (rank 1 of 5 chapters in Class 12 Computer Science (CS))
- Asked in board exams: 2022, 2023, 2024, 2025, 2026
- Typical question marks: 1-mark × 24, 2-mark × 13, 3-mark × 9, 4-mark × 2, 5-mark × 3
- Questions on BoardPrep: 82 (33 short answer, 30 MCQ, 11 very short, 5 Assertion-Reason, 2 case-based, 1 long answer), 55 with official marking-scheme answers
Python Revision & Functions questions asked in CBSE board exams
Repeated questions first. Open the free app to see each question as it appeared in the paper, with its marking scheme.
- State True or False : "A Python List must always contain all its elements of same data type."
Board 20251 markvery shortRepeated: 2025,2026 - What will be the output of the following code ? 1 def f1(a,b=1): print(a+b,end='–') c=f1(1,2) print(c,sep='*') (A) 3–2 (B) 3–2* (C) 3–None (D) 3*None–
Board 20261 markMCQ - * 4 P a g e 7. (dictionaries) ? 1 (A) (sequence) (B) elements key (C) elements (value) …
Board 20261 markMCQ - SQL , (table) (aggregate function) (smallest value) (return) ? 1 (A) MIN() (B) MAX() (C) SMALL() (D) LOWER()
Board 20261 markMCQ - ( (BUILT_IN) (FUNCTION) / (METHODS) 2 (i) (List) L (List) L1 (ascending order) (List) L (element…
Board 20262 marksshort answer - D1 (dictionary) , 2 (i) (a) (Python expression) , Key 'RNo', D1 (b) Python expression D1 key value 12 (ii…
Board 20262 marksshort answer - Assertion (A) : [1,2,3]+'123' is an invalid expression in Python. 1 Reason (R) : In Python, a list cannot be concatenated with a string.
Board 20261 markAssertion-Reason - (ICT) (Training workshops) Next Step (Resource Persons) …
Board 20265 markscase-based - (a) FruitStack stack, list () (implement) , ‘Name’, ‘Origin’, ‘Price’ ‘Expiry’ Keys dictionary : 3 {…
Board 20263 marksshort answer - * 18 P a g e 31. (a) (code) output : 3 def Exam2026(given) : new=[] for ch in given[1:-1]: if ch.isupper(): new.reverse() elif ch not in new: new.append(ch) elif ch in new: new.pop() print(new) Exam2026("Gold–24Medals") 91* 19 P a…
Board 20263 marksshort answer - string s string (Vowels) (return) (lo…
Board 20262 marksshort answer - (statements) (output) : def Change(N) : N=N+10 print(N,end='$$') N=15 Change (N) print(N) (A) 25$$15 (B) 15$$25 (C) 25$$25 (D) 2525$$
Board 20251 markMCQ - f D 3 D1 f (dictionaries) f : D=("Suman": 40, "Raj":55, "Raman":60} Dl={"Aditi":30,"Amit":90,"Raj":20} ( (built-in Python functions) (i) (a) Dictionary "Ra" key value ffa/ statement ffa ! (b) Dictionary D1 (length) f statement 1 (ii) (a) Dictionary (key-value …
Board 20252 marksshort answer - (operator) True (evaluate)a, ·operator)·variable·(memory location), operator False (evaluate)1 (A) is (B) is not (C) and (D) or 91 Page 4 of 32 3. Identify the correct output of the following code snippet : game="0lympic2024" print(game.index("c")) (A) (B) (C)…
Board 20251 markMCQ - SQL (aggregate function) (NULL) (values) (specified column)(values) (A) len() (B) count() (C) number() (D) num()
Board 20251 markMCQ - sfa (data) : ["Gunjan","Jaundice",4,15000] (i) readdata(data) Cancer· (ii) counrec 1 (t) 91 Page 22 of 32 (a) Based on the data given above, answer the following questions : (i) Write the SQL statement to display the names and wages of those workers whose wage…
Board 20255 markslong answer - (a) 3(output) a : def ExamOn(mystr) : newstr = "" count = 0 for i in mystr: if count%2 != 0: newstr = newstr + str(count-1) else: newstr = newstr + i.lower () count += 1 newstr = newstr + mystr[:2] print("The new string is:", newstr) ExamOn("Genx") 91 Page 18 …
Board 20254 marksshort answer - , (integer) argument (syntax)(logical errors) def Sum(N) for I in range(N): I+S=S return s print(Sum(10) 2(staata NAME, DEPARTMENT, BASICSAL EMPLOYEES SQL table staf)(details) (i) (a)(attribute) (PRIMARYKEY) 1 1 (b (constraint) (attribute) AME f f fa (i) (a) E…
Board 20253 marksshort answer - (a) (Python function) f "lections . txt" In an election many people vote to choose their representative. The candidate getting the maximum share of votes stands elected. Normally, one person has to vote once. The process of voting may vary with time and region…
Board 20253 marksshort answer - (a) Clrstack (stack) (tuple)i-ColorName·RED·GREEN·BLUE f I ColorName (string) RED· GREEN·BLUE quf (integers)1(stack)·"Yellow'·237, 250·68· 3×1=3 clrstack f operations f(Python)ff -f- q (user-defined functions) ff : () push_clr(clrstack· new_clr): q (function) …
Board 20253 marksshort answer
Practise all 82 Python Revision & Functions questions with answers →
Other Class 12 Computer Science (CS) chapters
Frequently asked questions
How many marks does Python Revision & Functions carry in the CBSE Class 12 Computer Science (CS) board exam?
Across recent CBSE board papers, Python Revision & Functions carried about 24.5 marks per paper on average, making it number 1 of 5 chapters by weightage.
Which years were Python Revision & Functions questions asked in CBSE boards?
Questions from Python Revision & Functions appeared in the 2022, 2023, 2024, 2025, 2026 CBSE Class 12 board exams.
Where can I practise Python Revision & Functions previous year questions for free?
On BoardPrep: all 82 Python Revision & Functions questions are free to practise online, with official CBSE marking-scheme answers where published.