The Python Mistakes That Cost Marks in the Board Exam
Most Python marks lost in CBSE board papers are not lost to hard questions. They go to a short list of repeat errors: wrong indentation, confusing return with print, the wrong file mode, off-by-one in loops and ranges, and mutable default arguments. All of them are fixable by writing code rather than reading it.
Why this list is short
Programming carries 40 of the 70 theory marks in Class 12 Computer Science and 45 of 70 in Class 11. Marks there are rarely lost to unfamiliar problems; they are lost to the same handful of slips, repeated.
1. Indentation that does not match intent
The most common single error. A statement placed one level out runs after the loop instead of inside it, and the output changes completely. In an output-prediction question, that is the whole mark.
2. return versus print
A function that prints returns None. Students write a function that prints, then try to use its value, and cannot explain why the result is None. Examiners test this deliberately.
3. File modes
Opening in 'w' when you meant 'a' silently erases the file. Know the difference between r, w, a, r+, and the binary variants, and remember that reading after writing needs the pointer moved.
4. Off-by-one in range()
range(1,5) gives 1, 2, 3, 4. Not 5. Simple, and still one of the most frequent causes of a wrong output answer.
5. Mutable default arguments
Writing def f(x, lst=[]) creates one list that persists across calls. It is a favourite of tricky output questions because the second call surprises everyone who has not met it.
6. Confusing = and ==
Assignment versus comparison. Rare in isolation, common under exam pressure.
How to stop making them
- Write programs by hand on paper occasionally, since that is how the exam works.
- For every snippet, predict the output before running it.
- Keep an error log: each time you get one wrong, write the rule down once.
- Revisit the log weekly. Six rules learned properly is worth more than another chapter read.

