Resources / Lesson pack

Robot Route: finding the bug

A 30-minute lesson. Pupils program a solar-farm rover, find out what went wrong, and fix it one block at a time.

Draft. This pack has not yet been checked by a teacher or tried with a class.

At a glance

The lesson at a glance
ItemDetails
Ages5 to 14, with a zone chosen to suit your class
Time30 minutes
You needOne device for each pair, and an internet connection to open the game
Sign-upNone. Pupils give no names or personal details
LanguageEnglish and Arabic
ResultsThe free version on this website does not send you results. Pupils can show you their screens

Learning goals

By the end of the lesson, pupils can:

  • give a computer exact instructions in the right order
  • predict what a program will do before running it
  • find and fix a bug by stepping through a program

Before the lesson

  • Try it first. Play one zone yourself. Each takes 10 to 20 minutes.
  • Choose your class. Choose your curriculum and year group, and the zones are marked for your class.
  • Choose one zone. Use the table under "Next lessons". Each zone has 10 missions.

Lesson plan

Lesson plan, 30 minutes in total
MinutesWhat happensYour role
0 to 5Starter: one pupil gives another exact directions to reach a place in the room. The "robot" does only what is said.Ask: "What went wrong when the instruction wasn't exact?"
5 to 20Pairs play the chosen zone. Before pressing GO, they predict where the rover will stop.Ask: "Which block is the problem?" Encourage Step, which runs one block at a time.
20 to 25Class discussion, using the questions below.Share one bug that a pair found and how they fixed it.
25 to 30Exit question, with no device.Ask pupils to explain the fix as well as give it.

Questions to ask

  • What did you predict? What really happened? Why were they different?
  • How did Step help you find the bug?
  • Did your program work the first time? Is a bug a bad thing?
  • Could the same program work on a different map? Why, or why not?

Exit question

"A panel is 2 squares ahead of the rover. The program is: move, clean, move. What goes wrong, and how would you fix it?"

The rover cleans after 1 move, before it reaches the panel. The fix is: move, move, clean.

Common mix-ups

Common mix-ups and what to say
What pupils may think or doWhat you can say
"The computer will know what I meant."It does exactly what the blocks say, and nothing else.
Blocks in the wrong orderOrder matters. Follow the program one block at a time and see where it goes wrong.
One move too many or too fewCount the squares, or use Step to watch each move.
Confusing left and rightTurns depend on the way the rover is facing. Imagine you are the rover.
Not sure what goes inside a loopOnly the blocks inside the loop repeat. Read out one trip around the loop.
Using a loop when a check is needed, or the other way roundA loop repeats. An "if" decides once. Ask: "Do I need to do this again, or choose?"
A program that works on only one mapUse the sensors, so the rover checks what is there rather than following fixed steps.

Activity with no devices

Human robot. Mark a grid on the floor with tape. One pupil writes a program on paper using move, turn left, turn right and clean. Another pupil follows it exactly. When it goes wrong, the pair finds the first wrong step and rewrites it.

Next lessons

Each zone takes 10 to 20 minutes, and builds on the ones before it.

The zones in Robot Route
ZoneWhat it addsAges
Step by StepMoving, turning, cleaning and charging5 to 7
Bug HuntFinding and fixing bugs7 to 9
Loop LaneRepeating with loops9 to 11
Sensor FieldSensors and "if"9 to 11
Until the Sun SetsRepeating until something happens10 to 12
Make a MoveWriting your own functions11 to 13
Text ModePython-style text11 to 14

Good to know

  • Stars: one for solving it, one for no bumps, and one for using as few blocks as the best answer.
  • Text Mode: this uses Python-style text for the rover only, and it isn't full Python.
  • Keyboard: pupils can play without a mouse. The rules in the game explain how.
  • Curriculum: this pack isn't mapped to curriculum standards yet.