Grade 7 · Media & Informatics
Find and fix mistakes (bugs) in a set of instructions, working calmly step by step.
When a program does not do what you wanted, it has a bug — a mistake in the instructions. Finding and fixing bugs is called debugging, and it is a normal, everyday part of working with computers. Even expert programmers spend much of their time debugging, so a bug is nothing to be ashamed of.
The computer follows your instructions exactly, even when they are wrong. So a bug is usually a mistake in what you told it, not the computer 'misbehaving'. Common bugs are steps in the wrong order, a step left out, or a condition that is not quite right.
A good way to debug is to work calmly and step by step: read the instructions in order, try to follow them yourself exactly as the computer would, and check where the result first goes wrong. Change one thing at a time and test again. Patience and careful checking fix far more bugs than guessing.
Have a go right here. Nothing is saved and you can retry as much as you like. Create a free account when you want to save your progress and get Archie, your tutor.
Create a free account to save your progress, track mastery and ask Archie, your tutor, for a hand.
Already with us? Open this lesson in learncoach.ch for mastery tracking and Archie, your tutor.