Caffeinated Coder
Book an appointment
Lesson 10 · First steps in code

Debugging: finding what went wrong

Every programmer writes bugs; the skill is finding them. Step through one small Python file that holds three bugs: a syntax error that stops it starting, a runtime error with a traceback, and a logic error that quietly gives the wrong average. Then hunt the last one down by reproducing it, printing values, pausing at a breakpoint and explaining the code to a rubber duck, and fix it by changing one thing.

10 min10 steps6 questionsBeginner
Fig 10 · Interactive
Loading figure…
or ← →

Quiz Unlocks after the last step.