CBSE Class 12 Computer Science 2026 — QuizCluster Solutions
Comprehensive question-by-question independently authored solutions for CBSE Class 12 Computer Science Board Examination (2026). Questions are referenced directly to the official CBSE Question Paper.
Solutions and conceptual explanations are independently prepared by QuizCluster. QuizCluster is an independent educational platform and is not affiliated with, endorsed by, or sponsored by the Central Board of Secondary Education (CBSE). Official question papers are accessed via direct external links to official CBSE repositories and are never hosted or mirrored on QuizCluster.
Question Index
Q1 of 35Practice chapter-wise adaptive MCQs to strengthen weak concepts from this board paper.
View all years for this subjectPython Revision Tour & Functions: Python Scope, Mutability and List Comprehensions
Step 1: Default argument evaluation in Python
In Python, default arguments like `records=[]` are evaluated ONCE when the function definition is executed, creating a single persistent mutable list object shared across calls that don't pass an explicit argument.
Step 2: Stepwise trace of function calls
1. `process_data(5)`: Appends 10 to default list → returns `[10]`. 2. `process_data(10)`: Uses same default list and appends 20 → returns `[10, 20]`. 3. `process_data(15, [100])`: Uses explicit list `[100]`, appends 30 → returns `[100, 30]`. 4. `process_data(20)`: Reverts to shared default list, appends 40 → returns `[10, 20, 40]`.
Mutable default parameters persist across multiple function invocations in Python; use `None` as default sentinel to avoid shared state.
Assuming `records` is reset to empty list `[]` on each call.
Source of question paper: Central Board of Secondary Education (CBSE). QuizCluster provides independently prepared educational solutions and explanations. QuizCluster is an independent educational platform and is not affiliated with or endorsed by CBSE. Question papers are accessed through links to official CBSE resources and are not hosted by QuizCluster.