Mini Minds Hub · Free printable

Debug the Treasure Bot: Free Printable Worksheet for Year 3

  • ForYear 3
  • StageKey Stage 2
  • CostFree
  • FormatPrintable PDF

Debug the Treasure Bot asks Year 3 children (ages 7 to 8) to follow, fix and shorten programs that move a robot around a grid map. Bot starts on A4. Children work out which square it reaches, write steps of their own and plan a route to the Gold. Rocks block Bot, so every program needs checking one square at a time.

Before anyone writes, model one program with a counter on A4. Say each command aloud and move the counter one square at a time. The usual slip is counting the start square as the first move, so only count the squares Bot lands on. Then ask your child to explain why Bot stopped where it did.

What is on the sheet

The sheet has a grid map with columns A to D and numbered rows, plus a table to fill in. Children read programs, trace each one and name the square Bot reaches. They write a single step to move Bot between two squares. Then they write a longer program to reach the Gold, starting with Up. Each numbered question has space for an answer, so children can show their thinking as well as the result.

  • Row
  • A
  • B
  • C
  • D
  • Bot does Right 3, Up 3. Which square does it reach?
  • Bot does Up 3, Right 2. Which square does it reach?
  • Write one step that moves Bot from A4 to D4.
  • Write a program that takes Bot from A4 to the Gold. Go Up first.

How to read a program

Find the start

Put a finger or counter on the start square. On this map, Bot starts on A4. Name the square aloud before moving anything.

One command at a time

Read a single command, such as Up or Right, and move that many squares. Finish one command before reading the next.

Watch for rocks

Rocks block Bot. If a move would run into a rock, stop and look again. The program may have a bug.

Say where Bot ends

Name the final square using the letter first, then the number. Check it matches the map.

Algorithms, bugs and debugging

An algorithm is a set of steps, in a clear order, that does a job. A program is an algorithm written so a computer can follow it. Computers do exactly what they are told, nothing more and nothing less. That is why the order and the size of each step matter. Children need to read every command carefully and not guess what was meant.

A bug is a mistake in a program. Debugging means finding the mistake and fixing it. Good programmers expect bugs, so finding one is part of the work and not a failure. Children debug by tracing a program step by step and checking each move against the map. A repeat lets one instruction be used again, which makes a long program shorter.

Skills and curriculum link

  • Following an algorithm
  • Finding and fixing bugs
  • Using a repeat
  • Grid references
  • Logical reasoning

Ideas that help with programming

  • Order mattersChanging the order of commands can change the route a robot takes. Children should always read from the first command to the last.
  • Computers are literalA computer does exactly what the program says. It cannot guess what the programmer meant, so each step must be precise.
  • Repeats save writingIf the same step happens again and again, a repeat can replace the copies. The program is shorter but does the same job.
  • Bugs are normalProgrammers test, find bugs and fix them all the time. Tracing a program slowly is the quickest way to spot one.

Key words

  • AlgorithmA set of steps in order that solves a problem or does a task.
  • ProgramAn algorithm written as commands that a computer or robot can follow.
  • BugA mistake in a program that stops it working as planned.
  • DebugTo find a bug and fix it.
  • RepeatDoing the same step more than once. It lets you write the step only once.
  • Grid referenceA letter and a number that name one square, such as A4.

How to use it

  1. Print both pages. Page 1 is for your child. Keep page 2 for yourself, as it has the notes and answers.
  2. Look at the map together. Find the start square and talk about what the rocks do.
  3. Give your child a counter to act as Bot. Let them trace each program with a finger or pencil before they write.
  4. Work through the first question together and talk about each choice. Then let your child try the rest, saying each step aloud.
  5. Check with the answers on page 2. Ask, "How did you know where Bot would go?" Come back another day to try again.

Help, stretch and game ideas

If it feels too hard

Give the child a counter to be Bot and let them move it square by square. Say each command aloud as they move. Ask them to touch only the squares Bot lands on. Start with the shorter programs and come back to the longer ones once the counter method feels easy.

To stretch confident children

Invent a program with a hidden bug for a partner to find. Write the program, say where Bot should end up, then check that exactly one step is wrong. Your partner must find the bug, fix it and explain why the fix works.

Make it a game

Swap sheets in pairs. One player reads a program aloud while the other moves the counter without looking at the answer. Then swap roles. Score a point each time the counter ends on the square the reader meant. Agree the target square before reading.

Mistakes to watch for

Watch forA child counts the start square as the first move, so Bot ends one square short.

Try thisPut the counter on the start square and only count the squares it moves to. Touch each new square as you say the number.

Watch forA child writes the number before the letter, such as 4A instead of A4.

Try thisSay the letter first for the column, then the number for the row. Point to the column at the top, then the row number.

Watch forA child gets muddled about which way the row numbers change when Bot goes Up.

Try thisUse the map. Up goes towards row 1. Trace the move with a finger and watch which way the number goes.

Talk about it

  • How did you know where Bot would stop?
  • What does the rock change about Bot's journey?
  • Which step would you check first if a program did not work?
  • Can you say the program in a different order? Does Bot end up in the same place?
  • Why does a computer need every step to be exact?
  • Where could a repeat make your program shorter?

Take it off the page

Human robot

Mark out a grid on the floor with chalk outdoors or paper squares indoors. One person is Bot and another gives commands. Swap roles and add a rock made from a cushion or a shoe.

Treasure hunt at home

Hide a small toy and write a short program using Up, Right and counting steps. A family member follows it exactly. If they miss the treasure, debug it together.

Draw your own map

Draw a grid on paper, label the columns with letters and rows with numbers, and place treasure and rocks. Write a program for a friend to trace with a counter.

Who it is for

Parents

Sit beside your child for the first program, then let them lead. Use a counter and keep your questions short. If something goes wrong, say, "Let us find the bug," and trace it together rather than giving the answer.

Teachers

Use it as a starter or plenary after teaching sequences and debugging, as an early finisher task or as cover work. It needs no equipment beyond counters, and the stretch idea suits pairs who finish first.

Home educators

Pair it with a real life version. Give directions around a room or garden and let your child follow them exactly, then swap. It links neatly to other computing, maths and mapping work in your plan.

Where this fits in computing

Before this, children give and follow simple directions, such as forwards, left and right, and learn that instructions must be in the right order. They also meet the idea that a program is a set of steps to be followed exactly.

After this, children can trace longer programs, use repeats to shorten them and plan their own routes. Later, they may use block based programming tools on a computer, where the same ideas of sequence, repeat and debugging apply.

Questions parents and teachers ask

What age is Debug the Treasure Bot for?

It is written for Year 3, which is ages 7 to 8, in Key Stage 2. Children who are confident following instructions in order will find it easiest, and the counter idea supports those who need help.

What will children practise?

Children practise following, debugging and shortening step by step programs on a grid map. They also name squares using a letter and a number, and explain why Bot ends up where it does.

Do children need a computer?

No. The activity needs only paper and a pencil, and a counter is helpful. It teaches ideas that sit behind programming, such as order, accuracy and debugging, without needing a screen.

What is a bug?

A bug is a mistake in a program that stops it doing what was planned. Debugging means finding that mistake and fixing it. Children find bugs by tracing a program one step at a time and checking each move.

Why use a counter?

A counter lets children act out each command and see the result. It slows thinking down so mistakes are easier to spot. Moving it square by square also helps stop children counting the start square.

Can I use it in class?

Yes. Teachers can use it as a starter, plenary, early finisher task, homework or table activity. It needs no preparation beyond printing, and page 2 has support and stretch ideas for mixed groups.

Are the answers included?

Yes. Page 2 is for the grown up and has the answers, notes on how to use the sheet, help for children who find it hard and a stretch idea. Keep it back until your child has tried.

Preview the full PDF

Made by Jaques of London, making games for families since 1795. A printable supports classroom learning and does not replace a teacher.