Year 1 (ages 5–6, Kindergarten in the US) · Computing · What is an algorithm? · Lesson 3
Finding and fixing bugs
Testing simple programs, predicting outcomes, and finding and fixing bugs by changing one step and testing again.
Exam boards: this lesson matches the AQA and Pearson Edexcel GCSE computing courses. Check which course your school follows.

13-minute video lesson
Teaching, worked examples and 20 practice questions solved step by step.
Watch free for a monthWhat your child will learn
- Know what a bug is
- Predict outcomes
- Find and fix a bug
- Test again
The method
- Predict, then run it.
- Watch where it goes wrong.
- Change just that step.
- Test again.
Key words: bug, debug, test, predict, program.
Worked examples
Worked examples from the lesson, with every step.
Question 1
Goal: A1 to A2. Program: forward 2. Fix it.
- Step 1: one too many
Answer: forward 1
Question 2
Goal: A1 to A4. Program: forward 2. Fix it.
- Step 1: one too few
Answer: forward 3
Question 3
Goal: A1 to C1. Program: turn right, forward 1. Fix it.
- Step 1: count squares
Answer: turn right, forward 2