Skip to content
Menu

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.

Whiteboard video lesson: Finding and fixing bugs

13-minute video lesson

Teaching, worked examples and 20 practice questions solved step by step.

Watch free for a month

What your child will learn

  • Know what a bug is
  • Predict outcomes
  • Find and fix a bug
  • Test again

The method

  1. Predict, then run it.
  2. Watch where it goes wrong.
  3. Change just that step.
  4. 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.

  1. Step 1: one too many

Answer: forward 1

Question 2

Goal: A1 to A4. Program: forward 2. Fix it.

  1. Step 1: one too few

Answer: forward 3

Question 3

Goal: A1 to C1. Program: turn right, forward 1. Fix it.

  1. Step 1: count squares

Answer: turn right, forward 2