CBSE 2026 results are out, Mukul scored a perfect 100/100 in Computer ScienceSee all toppers →
CBSE · Python · 6 min read

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.
{ }

Frequently asked questions

Why do students lose marks in Python board questions?+
Mostly to a short list of repeat slips rather than difficulty: indentation, confusing return with print, wrong file modes, off-by-one in range, and mutable default arguments.
What does range(1,5) return in Python?+
1, 2, 3 and 4. The end value is excluded, which is a frequent source of wrong answers in output questions.
Why does my function return None?+
Because it prints instead of returning. print displays a value; return hands it back to the caller. A function without a return statement returns None.
How much Python practice is enough for the boards?+
Consistency matters more than volume. A few programs written and debugged each week from Class 11 is more effective than long sessions close to the exam.

Written by Kajal Mehta (Kajal Ma'am), founder of Kwickprep, teaching computer subjects since 2006. Updated 2026-09-03.

Choosing between ICSE and CBSE?

Ask Kajal Ma'am directly, 20+ years teaching computer science. Free demo class first, no payment.

Talk to Kajal Ma'am on WhatsApp

Or see the courses course →

Studying outside India?

We coach CBSE, IGCSE & international students across the globe, one-to-one, in your local time zone.

Visit International →