Sections › Coding › Grid Treasure Code
Grid Treasure Code
Write step-by-step code to move a 'robot' across a paper grid to the treasure. Find the bugs and shorten it with loops.
CodingAges 8–1135 minutesFamily plan
How it started
My daughter wrote a program to get her toy dinosaur to a coin. It walked straight off the edge of the map. 'Bug!' her brother shouted with enormous pleasure. She fixed it, then he challenged her to do it in fewer moves, and the game went on until bedtime.
What you need
| 1 | sheet of squared paper or a 6×6 grid drawn on A4 |
| 1 | small toy or counter as the robot |
| 1 | coin or sticker as the treasure |
| 3–4 | small obstacles (erasers, Lego bricks) |
| 1 | pencil and arrow cards: F (forward), L (turn left), R (turn right) |
What your child will learn
- Sequencing
- Debugging
- Loops
- Spatial reasoning
Key words: algorithm, sequence, bug, debug, loop
🔒 The full lesson is part of the Family plan
Unlocks the 8 illustrated steps, safety notes, the science for kids and parents, problems and fixes, variations, the printable record sheet, the 5-question quiz and the parent guide.
A free account gets this month's two free activities in full: