
Fifteen ready-to-run Python debugging challenges for KS3 and GCSE, with faulty files, corrected code, student and teacher packs, and editable Word files.
Students investigate five syntax errors, five runtime errors and five logic errors. For each challenge, they:
- read a short incident brief;
- run the faulty Python file;
- compare the broken result with the required output;
- explain what caused the problem;
- fix the code; and
- run the code again to check the fix.
The Student Pack contains the 15 faulty Python files and a 17-page workbook. Each challenge page shows the incident brief, broken output, required output and faulty code, followed by space to record the cause, fix and testing.
The Teacher Pack contains 15 corrected files and a 17-page guide. For every challenge, the guide gives the explanation and changed code, three staged clues, common mistakes to watch for, questions to check understanding and three extension tasks that become progressively
harder. Editable Word versions of both guides are also included.
You can work through one challenge with the whole class, give different challenges to pairs, use a few as lesson starters, or build a longer debugging sequence. Give students the Student Pack and keep the Teacher Pack for lesson preparation and support.
Students should already know basic Python variables, selection, loops, lists, dictionaries and arithmetic, and should be able to run a Python file.
Python 3.10 or later is required. No internet connection or extra packages are needed. Every faulty and corrected file has been tested against the output shown in the guides.
The activities are not tied to a particular exam board and can be used with any introductory Python course that covers debugging.
Something went wrong, please try again later.
This resource hasn't been reviewed yet
To ensure quality for our reviews, only customers who have purchased this resource can review it
Report this resourceto let us know if it violates our terms and conditions.
Our customer service team will review your report and will be in touch.