Skip to main content

23 November 2026

The Python mistakes GCSE students make most, and which ones cost marks

Auto generated profile Image
Written by

Eoin Shannon

Every year before mocks I find myself saying the same things: cast your input, check your boundaries, read the question. This year I wanted evidence rather than gut feeling. Which mistakes do students actually make most, and which of those lose marks in the exam?

I teach GCSE and A Level Computer Science, and I built CodeBash, which thousands of KS3 and GCSE students use for Python practice. Every time a student runs or submits code there, we keep the error messages and the results of each test. So I looked at the anonymised data from July 2025 to now, counting each mistake once per student per task.

What I found

  • Most first attempts fail, but most students get there. Only 45% of GCSE programming tasks were right on the first submission, but 90% were right in the end. In the exam there's one attempt and no error messages.
  • "It runs, so it must be right." Half of GCSE students submitted code that passed some tests, ran without error on the rest, and still gave the wrong answer. Usually it was right for the example and wrong at a boundary.
  • input() catches everyone. 37% crashed a program by casting input that wasn't a number, and 32% joined text to a number without str().
  • Lists are the hardest first time. GCSE list and array tasks had the lowest first-try success of any topic, at 38%.
  • Output precision is weak. 62% failed a test where the logic was right but the output was slightly off, mostly in spacing. CodeBash marks output exactly by default. Teachers can switch on lenient mode, though 93% of assignments stay exact.

Which of these cost marks?

Not all of them. Examiners won't take a mark for a stray space, and a missing colon rarely matters if the meaning is clear. The logic and type mistakes are different. A boundary checked with > instead of >=, input that is never cast, = where == is needed, a total reset inside the loop, or a list read from position 1 all make the answer wrong. Mark schemes award marks for getting exactly these right. Even the spacing finding matters indirectly: students who don't check their output against the question tend to be the ones who miss the boundaries.

What I made from it

  • Mock Ready, a free student booklet on the ten mistakes with the clearest exam impact. Each has the evidence, the fix, a two-minute practice question to do on paper in Python and OCR Exam Reference Language, and links to the matching questions in our OCR J277 mock papers.
  • A five-page teacher report with the figures by topic and key stage, each mistake mapped to a misconception code, and a lesson idea for each. I've also added it to CAS resources.

The booklet, the report, free J277 mock papers and diagnostic tests are all at codebash.co.uk/resources/practice-papers