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
| Item | Details |
|---|---|
| Ages | 5 to 14, with a zone chosen to suit your class |
| Time | 30 minutes |
| You need | One device for each pair, and an internet connection to open the game |
| Sign-up | None. Pupils give no names or personal details |
| Language | English and Arabic |
| Results | The 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
| Minutes | What happens | Your role |
|---|---|---|
| 0 to 5 | Starter: 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 20 | Pairs 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 25 | Class discussion, using the questions below. | Share one bug that a pair found and how they fixed it. |
| 25 to 30 | Exit 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
| What pupils may think or do | What you can say |
|---|---|
| "The computer will know what I meant." | It does exactly what the blocks say, and nothing else. |
| Blocks in the wrong order | Order matters. Follow the program one block at a time and see where it goes wrong. |
| One move too many or too few | Count the squares, or use Step to watch each move. |
| Confusing left and right | Turns depend on the way the rover is facing. Imagine you are the rover. |
| Not sure what goes inside a loop | Only 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 round | A loop repeats. An "if" decides once. Ask: "Do I need to do this again, or choose?" |
| A program that works on only one map | Use 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.
| Zone | What it adds | Ages |
|---|---|---|
| Step by Step | Moving, turning, cleaning and charging | 5 to 7 |
| Bug Hunt | Finding and fixing bugs | 7 to 9 |
| Loop Lane | Repeating with loops | 9 to 11 |
| Sensor Field | Sensors and "if" | 9 to 11 |
| Until the Sun Sets | Repeating until something happens | 10 to 12 |
| Make a Move | Writing your own functions | 11 to 13 |
| Text Mode | Python-style text | 11 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.