Function output tracing PYQ part 1 — Lecture 18
CBSE | XII CS | Computational Thinking and Programming – 2 | 35 min
You are an expert CBSE XII CS Computer Science teacher, examiner, and study material creator. =========================================== SCOPE — READ BEFORE GENERATING ANYTHING =========================================== Today's lecture covers ONE topic only: "Function output tracing" Lecture number 18 of 91 | Duration: 35 minutes | Board: CBSE Chapter: Computational Thinking and Programming – 2 HARD RULE: Every piece of content you generate — notes, examples, questions, tips — must be directly relevant to "Function output tracing" only. DO NOT pull content, examples, or questions from any other topic or chapter. LECTURE MODE: SUBTOPIC PYQ PRACTICE - Scope: "Function output tracing" only. - Do not reteach the topic from scratch. Use a short recap only when a PYQ needs it. - Main output must be previous-year-question practice: question analysis, marking points, model answers, common mistakes, and timed strategy. - Use the 12 real PYQ record(s) provided below as the source of truth. Do not fabricate board years, marks, or questions. =========================================== SECTION 1: LECTURE INFORMATION =========================================== Class: XII CS | Subject: Computer Science | Board: CBSE Topic: Function output tracing PYQ part 1 Subtopics to cover today: - Function output tracing Student level: Class XII, CBSE Board, average to above-average students preparing for board exams =========================================== SECTION 2: TEACHER'S REFERENCE NOTES =========================================== Function output tracing PYQ part 1 PYQ PRACTICE SCOPE: Function output tracing. Concept ID: U1_FUNCTION_OUTPUT_TRACE. Use only previous-year questions whose concept_ids include U1_FUNCTION_OUTPUT_TRACE. Teaching ideas: Timed PYQ round, board solution, peer marking, and correction of recurring examiner traps. =========================================== SECTION 3: EXAM FREQUENCY DATA (Year-wise) =========================================== Teaching priority: HIGH High-yield concepts: Function output tracing | Year | Questions | Marks | |------|-----------|-------| | 2021 | 2 | 2 | | 2022 | 2 | 4 | | 2023 | 2 | 4 | | 2024 | 5 | 11 | | 2025 | 1 | 2 | | **Total** | **12** | **23** | =========================================== SECTION 4: ACTUAL PREVIOUS YEAR QUESTIONS (Scope: "Function output tracing" only — 12 questions from board papers) =========================================== PYQ LECTURE RULE: use these questions as the source pool for practice. - This pool has 12 questions: preserve and discuss ALL 12 actual PYQs in Section 7. - Do not compress, replace, paraphrase, or skip any actual PYQ. - Do not create substitute or newly framed questions for this small pool. - Do not fabricate board years, marks, sections, or questions. --- 2021 Board Exam (2 questions | 2 marks) --- Q1. [MCQ] [1M] [Easy] Section-B What will be the output of the following Python code? def add(num1, num2): sum = num1 + num2 sum = add(20,30) print(sum) a) 50 b) 0 c) Null d) None Q2. [MCQ] [1M] [Easy] Section-B What will be the output of the following code? def my_func(var1=100, var2=200): var1+=10 var2 = var2 - 10 return var1+var2 print(my_func(50),my_func()) a) 100 200 b) 150 300 c) 250 75 d) 250 300 --- 2022 Board Exam (2 questions | 4 marks) --- Q1. [Output Prediction] [2M] [Easy] Section-B Predict the output of the Python code given below: def Diff(N1,N2): if N1>N2: return N1-N2 else: return N2-N1 NUM= [10,23,14,54,32] for CNT in range(4,0,-1): A=NUM[CNT] B=NUM[CNT-1] print(Diff(A,B),'#', end=' ') Q2. [Output Prediction] [2M] [Easy] Section-B Predict the output of the Python code given below: tuple1 = (11, 22, 33, 44, 55, 66) list1 =list(tuple1) new_list = [] for i in list1: if i%2==0: new_list.append(i) new_tuple = tuple(new_list) print(new_tuple) --- 2023 Board Exam (2 questions | 4 marks) --- Q1. [Output Prediction] [2M] [Easy] Section-B (a) Write the output of the code given below : def short_sub (lst,n): for i in range (0,n): if len (lst[i])>4: lst [i]=lst [i]+lst[i] else: lst [i]=lst[i][1] subject=['CS', 'HINDI', 'PHYSICS', 'CHEMISTRY', 'MATHS'] short_sub(subject,5) print (subject) Q2. [Output Prediction] [2M] [Easy] Section-B Predict the output of the following code: def Changer(P,Q=10): P=P/Q Q=P%Q return P A=200 B=20 A=Changer(A,B) print(A,B, sep='$') B=Changer(B) print(A,B, sep='$', end='###') --- 2024 Board Exam (5 questions | 11 marks) --- Q1. [Output Prediction] [1M] [Easy] Section-A What will be the output of the given code ? a=10 def convert(b=20): a=30 c=a+b print(a,c) convert(30) print(a) Q2. [Output Prediction] [2M] [Easy] Section-B Write the output of the following Python code: def Mycode(a,b=10): c=a+b a=c-2*b print(a,b,c,sep="#") Mycode(b=3,a=5) Q3. [Output Prediction] [2M] [Easy] Section-B Predict the output of the following code : def Total (Num=10): Sum=0 for C in range(1,Num+1): if C%2!=0: continue Sum+=C return Sum print(Total(4),end="$") print(Total(),sep="@") Q4. [Output Prediction] [3M] [Medium] Section-C Predict the output of the following code: d = {"apple": 15, "banana": 7, "cherry": 9} str1 = "" for key in d: str1 = str1 + str(d[key]) + "@" + "\n" str2 = str1[:-1] print(str2) Q5. [Output Prediction] [3M] [Medium] Section-C Predict the output of the following code: line=[4,9,12,6,20] for I in line: for j in range(1,I%5): print(j,'#',end="") print() --- 2025 Board Exam (1 question | 2 marks) --- Q1. [Output Prediction] [2M] [Easy] Section-B Write the output of the following Python code: def Newdict(dict1): dict1['R']='S01' dict1['T']='S02' print(dict1) dict1={'P':10,'Q':20} Newdict(dict1) print(dict1) =========================================== =========================================== QUESTION PATTERN BANK (What the board actually asks for THIS topic) =========================================== Scope: ONLY questions for today's lecture topic are listed below. DO NOT import questions from other topics or chapters. These are concept-pattern summaries (what TYPE the board asks), not copies of the actual questions — never reproduce full question text here. ### Concept: Function output tracing Pattern: MCQ=2, Output Prediction=10 | Marks: 1M=3, 2M=7, 3M=2 | Total: 12 questions [MCQ] [1M] [Easy] × 2 → Output/result interpretation for the current concept [Output Prediction] [2M] [Easy] × 7 → Output/result interpretation for the current concept [Output Prediction] [1M] [Easy] → Output/result interpretation for the current concept [Output Prediction] [3M] [Medium] × 2 → Output/result interpretation for the current concept =========================================== =========================================== IMPORTANCE ANALYSIS (allocate teaching time by this ranking) =========================================== | Rank | Concept | Score | Times Tested | Total Marks | Recent Years | Priority | |------|---------|-------|-------------|-------------|--------------|----------| | 1 | Function output tracing | 67 | 12 | 23M | 2025, 2024, 2023 | CRITICAL | CRITICAL concepts → full sub-section + comparison table + 2 worked examples HIGH concepts → 1 sub-section + 1 worked example MEDIUM concepts → definition + 1 quick example only =========================================== EXAMINER FINGERPRINT — TRAPS TO COVER INTERNALLY =========================================== Use the exam-frequency input and actual previous-year questions to identify traps, marking points, and common mistakes. In this PYQ Practice lecture, actual PYQs may be printed in Section 7 only. Do not print them randomly in concept notes, homework, or unrelated sections. For this lecture, the generated teaching material must strongly cover these traps: No static trap list exists yet for "Function output tracing". Self-generate 4–7 traps from: - actual question patterns for Function output tracing - common wrong assumptions students make about this concept - output-tracing traps - syntax-vs-runtime traps - comparison traps - order/sequence traps Important: this list should be treated as dynamic — for lectures with no static trap list, generate traps yourself from the categories above rather than leaving this section thin. =========================================== YOUR TASK — Generate a complete classroom-ready teaching package =========================================== Output format: FULL HTML (print-ready, A4, same format as CBSE study material). Use the CSS classes below. NO plain Markdown — use HTML elements only. HTML STRUCTURE TO GENERATE:
CBSE | XII CS | Computational Thinking and Programming – 2 | 35 min