Function output tracing PYQ part 2 — Lecture 19
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 19 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 2 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 2 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: Arguments parameters and scope, Function output tracing, Function output tracing | Year | Questions | Marks | |------|-----------|-------| | 2021 | 2 | 2 | | 2023 | 3 | 6 | | 2024 | 1 | 1 | | 2025 | 4 | 8 | | 2026 | 2 | 4 | | **Total** | **12** | **21** | =========================================== 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 code? value = 50 def display(N): global value value = 25 if N%7==0: value = value + N else: value = value - N print(value, end="#") display(20) print(value) a) 50#50 b) 50#5 c) 50#30 d) 5#50# Q2. [MCQ] [1M] [Easy] Section-B What will be the output of the following code? x = 3 def myfunc(): global x x+=2 print(x, end=' ') print(x, end=' ') myfunc() print(x, end=' ') a) 3 3 3 b) 3 4 5 c) 3 3 5 d) 3 5 5 --- 2023 Board Exam (3 questions | 6 marks) --- Q1. [Output Prediction] [2M] [Easy] Section-B Write the output of the code given below : a =30 def call (x): global a if a%2==0: x+=a else: x-=a return x x=20 print (call(35),end="#") print (call(40),end="@") Q2. [Output Prediction] [2M] [Easy] Section-B (a) Write the output of the Python code given below : g=0 def fun1(x,y): global g g=x+y return g def fun2 (m,n): global g g=m-n return g k=fun1 (2,3) fun2 (k,7) print (g) Q3. [Output Prediction] [2M] [Easy] Section-B (b) Write the output of the Python code given below : a=15 def update (x): global a a=2 if x%2==0: a*=x else: a//=x a=a+5 print (a,end="$") update (5) print (a) --- 2024 Board Exam (1 question | 1 marks) --- Q1. [MCQ] [1M] [Easy] Section-A What will be the output of the following code? c = 10 def add(): global c c = c + 2 print(c,end='#') add() c=15 print(c,end='%') a) 12%15# b) 15#12% c) 12#15% d) 12%15# --- 2025 Board Exam (4 questions | 8 marks) --- Q1. [MCQ] [1M] [Easy] Section-A What will be the output of the following code segment ? a=5 def func_1(b=10): global a a=b–10 b+=a print(a,b) func_1(a) (A) 0 5 (B) 5 0 (C) 0 –5 (D) –5 0 Q2. [MCQ] [1M] [Easy] Section-A What will be the output of the following Python code? i = 5 print(i,end='@@') def add(): global i i = i+7 print(i,end='##') add() print(i) a) 5@@12##15 b) 5@@5##12 c) 5@@12##12 d) 12@@12##12 Q3. [Output Prediction] [3M] [Medium] Section-C (a) Write the output on execution of the following Python code : P=[3,5,7,4] P.insert(2,3) P.extend([10, 6]) print(P) print(P.index(7)) print(P[::2]) Q4. [Output Prediction] [3M] [Medium] Section-C (b) Write the output on execution of the following Python code : def ALTER(Y=25): global X Y += X X += Y print(X,Y,sep="#") X=5; Y=15 ALTER(Y) ALTER() print(X,Y,sep="@") --- 2026 Board Exam (2 questions | 4 marks) --- Q1. [MCQ] [1M] [Easy] Section-A What will be the output of the following code ? 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- Q2. [Output Prediction] [3M] [Medium] Section-C (b) Write the output of the following code : def Exam2026(given) : new = 0 while given: if new % 2: new += given % 10 else: new += given % 5 print(new, end='-') given //= 10 Exam2026(123456) =========================================== =========================================== 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: Arguments parameters and scope, Function output tracing Pattern: MCQ=5, Output Prediction=4 | Marks: 1M=5, 2M=3, 3M=1 | Total: 9 questions [MCQ] [1M] [Easy] × 5 → Output/result interpretation for the current concept [Output Prediction] [2M] [Easy] × 3 → Output/result interpretation for the current concept [Output Prediction] [3M] [Medium] → Output/result interpretation for the current concept ### Concept: Function output tracing Pattern: MCQ=1, Output Prediction=2 | Marks: 1M=1, 3M=2 | Total: 3 questions [Output Prediction] [3M] [Medium] × 2 → Output/result interpretation for the current concept [MCQ] [1M] [Easy] → 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 | Arguments parameters and scope, Function output tracing | 46 | 9 | 14M | 2025, 2024, 2023 | CRITICAL | | 2 | Function output tracing | 27 | 3 | 7M | 2026, 2025 | 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 Arguments parameters and scope, Function output tracing, 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