Python Mistakes
Students Make
Two free booklets documenting the most common Python errors at KS3/GCSE and A-Level, drawn from hundreds of thousands of real student submissions on CodeBash. Every mistake includes wrong code, correct code, and a teacher tip.
CodeBash launched in September 2025. Since then, students have submitted hundreds of thousands of coding attempts across GCSE and A-Level Python challenges. These booklets are the result of looking closely at where they go wrong.
The mistakes are rarely random. They cluster. The same errors appear in cohort after cohort, school after school, and they tell us something useful about what students are actually thinking when they write code. These are not careless mistakes - they are conceptual ones. Students write exactly what they mean; they just mean something subtly different from what Python does.
110 Python Mistakes
KS3 / GCSE Edition
The most common Python errors made by KS3 and GCSE students, organised into 11 categories from basic input/output through to 2D lists.
- 1 Input and Output
- 2 Data Types and Conversion
- 3 String Manipulation
- 4 Selection
- 5 For Loops
- 6 While Loops
- 7 Lists
- 8 Functions
- 9 File Handling
- 10 Logic and Problem Solving
- 11 2D Lists
You'll receive one follow-up email with information about CodeBash. Nothing more unless you choose to hear more.
130 Python Mistakes
A-Level Edition
Advanced Python errors made by A-Level students, including extension topics flagged where content goes beyond standard specifications.
- 1 Recursion
- 2 Searching Algorithms
- 3 Sorting Algorithms
- 4 Binary Trees
- 5 Stacks and Queues
- 6 String Algorithms
- 7 File Handling (Advanced)
- 8 Subroutines and Modularity
- 9 Dynamic Programming
- 10 Algorithm Design
- 11 Dictionaries and Hash Maps
- 12 OOP and Classes
- 13 Graph Algorithms
You'll receive one follow-up email with information about CodeBash. Nothing more unless you choose to hear more.
Sample from the GCSE edition
input() always returns a string in Python. Students assume Python will convert it automatically when they use it in a calculation.
age = input("Enter your age: ")
next_year = age + 1
print(next_year)
age = int(input("Enter your age: "))
next_year = age + 1
print(next_year)
How teachers use these in the classroom
Starter activity
Project the wrong code on the board. Give students 60 seconds to spot the error before revealing the correct version and the explanation.
Pre-assessment checklist
Hand out the relevant category before a programming task or assessment. Students self-review the mistakes most likely to appear in their work.
Structured debugging
Give students the wrong code block and ask them to debug it, then compare their fix to the correct version and teacher tip.