This week’s topics
Finding and fixing errors
- Syntax errors
- Logic errors
What you will be able to do
- 5.1 Identify and fix syntax and logic errors.
Activity
Fix five broken programs.
Study materials
Further resources
- Think Python, Appendix A: Debugging · PDF · Downey, Think Python 2e (Green Tea Press), Appendix A: syntax, runtime and logic (semantic) errors, pp. 193–200 · for registered students
- Introduction to Python Programming, 1.6: Error messages · PDF · OpenStax Introduction to Python Programming (2024), 1.6: reading Python error messages, pp. 23–26 · for registered students
- Python Notes for Professionals, ch. 103: Debugging · PDF · GoalKicker Python Notes for Professionals, ch. 103: stepping through code with a debugger, pp. 496–498 · for registered students
- 37 million compilations: investigating novice programming mistakes on large-scale student… · Open-access article · Altadmri & Brown (2015), SIGCSE '15, ACM. Which syntax and logic errors beginners make most often. · for registered students
- The hands-up problem and how to deal with it: teachers' experiences of debugging in class · Open-access article · Gale & Sentance (2026), Informatics in Education. How teachers help pupils debug, with practical strategies. · for registered students
Materials marked “for registered students” open in the student portal, which is set up as soon as you receive final acceptance.