Skip to content

    Bug Garden

    Year 3 Debugging

    Trace long robot programs on bigger grids and find the one step that sends the robot the wrong way.

    • Ages 7–9
    • 3 quests
    • Beginner → Getting stronger → Challenge

    Every programmer writes bugs — the skill is finding them. Year 3 coders debug longer robot programs on bigger grids, tracing each step to find the one arrow that sends the robot the wrong way.

    What your child will learn

    • Trace a long program step by step
    • Find the one step that stops a program working
    • Say what the step should be instead

    Trace, don’t guess

    With six or seven steps, guessing rarely works. Put a finger on the start and follow each arrow in turn. The moment the robot goes somewhere it shouldn’t, you’ve found the bug.

    Example questions

    Here are a few questions like the ones in the first quest. Can you solve them?

    1. 1. The robot should reach the star, but one step has a bug. Which step is wrong?

      • Step 1
      • Step 2
      • Step 3
      • Step 4
      Show answer

      Answer: Step 1. Step 1 should be ↑ instead of ↓. Fix that one arrow and the robot reaches the star!

    2. 2. The robot should reach the star, but one step has a bug. Which step is wrong?

      • Step 1
      • Step 2
      • Step 4
      • Step 5
      Show answer

      Answer: Step 5. Step 5 should be → instead of ↓. Fix that one arrow and the robot reaches the star!

    3. 3. The robot should reach the star, but one step has a bug. Which step is wrong?

      • Step 1
      • Step 2
      • Step 3
      • Step 4
      Show answer

      Answer: Step 1. Step 1 should be → instead of ↑. Fix that one arrow and the robot reaches the star!

    Tips for grown-ups

    • Write directions to a room in your house with one deliberate mistake, and ask your child to find it.
    • Praise careful checking more than speed.