Tutorpip← About this lessonOpen the sheet →Download PDF
Ages 5+ · Coding · Finding bugs
Fix the path
🪨⭐🤖
The fixed path: the fourth card became a turn.
The big ideaTo fix a bug, find the step where it happens. Change it, and run it again.

How it works

Mia drew a chalk path for Bo, but there was a big pot in the way.

A bug is easy to find. Run the steps slowly, one card at a time, and see where Bo bumps.

Then change just that one step, and run it again. The other steps stay as they were.

Run the stepsslowlyFind the stepthat bumpsChange that onestepRun it again
How to fix a bug.

Example 1: Find the bump

  1. Bo goes forward four times along the bottom row.
  2. The first three steps are fine.
  3. The fourth step goes into the rock. There is the bug.
🪨⭐🤖
Forward four times: the fourth step goes into the rock.

Example 2: Change one card

  1. Mia swaps the fourth card for a turn.
  2. The other cards stay just as they were.

Example 3: Run it again

  1. Bo goes forward three times, turns left, and goes forward two times.
  2. He goes round and reaches the star.
  3. The bug is gone, because Mia found it and fixed it.
🪨⭐🤖
Forward three times, turn left, forward two times.

Example 4: Fix it at home

  1. Lay paper arrows on the floor with a pillow in the way.
  2. A grown-up robot follows only the arrows and bumps the pillow.
  3. Find the one arrow where it happens, change it, and try again.

Words to know

bug
A mix-up in the steps.
fix
To change a step so that it works.
card
One step in the path.
run
To follow the steps and see what happens.

Watch out

Try it

  1. Bo bumps on the fourth card. Which card do we change?
  2. Do we change every step to fix a bug?
  3. Mia swapped the fourth card for what?
  4. What do we do after we change the step?
Answers: 1. the fourth card · 2. no · 3. a turn · 4. run it again
Try at homeWith a grown-up, lay out a path of paper arrows on the floor and put a pillow in the way. The grown-up is the robot and follows only the arrows, so they will bump the pillow. Then find the one arrow where it happens, change that arrow, and try again.
For grown-upsMake a path of paper arrows on the floor with a pillow in the way. Be the robot who follows only the arrows, bump the pillow, then let your child find the one arrow to change and try again.
Open these notes on screenScan the code, or go to tutorpip.com.