Predicting code worksheet for Years 3–4: Predict the path

Members Chapter 3 of Sequences and Loops: Code a Robot and Squash the Bugs · Year 3, Year 4 · 3 pages · PDF, A4

All 4 worksheets in this game

One for each chapter

Predict the Path is a printable predicting code worksheet for Years 3 and 4 (ages 7 to 9) that teaches children to trace a program block by block to predict where a robot will stop and explain why. It follows the national curriculum in England for computing in Years 3 to 6: use logical reasoning to explain how some simple algorithms work and to detect and correct errors in algorithms and programs.

  • 3 A4 pages
  • Answers sheet
  • About 30 minutes
  • Colour or black and white
  • National curriculum

For members Membership opens every worksheet and every game. Already a member? Log in

Start with the free one: Getting the order right (chapter 1).

The game for this worksheet Sequences and Loops: Code a Robot and Squash the Bugs Chapter 3 · Logical reasoning: predicting and explaining what code does · read aloud ▶ Play chapter 3 in the gameChapter 1 is free

Print it on A4, in colour or black and white. Do it after the chapter, or before it to see what your child already knows.

What's on the worksheet

Trace a program one block at a time to predict where a robot will stop and which way it will face, and explain the prediction. With a human robot game and answers.

Page 1 · Learn
Flip traces a five-block program on a grid with a filled-in trace table showing each move and which way the robot faces. A warm-up turns a robot facing down and facing left.
Page 2 · Try it together
Human robot: write a short program for a grown-up, predict where they will stop and mark it with a cushion, then watch them walk it exactly.
Page 2–3 · Practise
Trace three programs to find the lettered square where the robot stops, fill in a trace table for a robot facing down, and predict where a repeat loop finishes.
Answers sheet
Every answer by page, including which wrong letters mean left and right were swapped, what to watch out for and quick ideas without paper.

3 A4 pages and an answers sheet · about 30 minutes

Using it at home

  • Play human robot in a hallway or garden: your child writes the moves and predicts, you walk them exactly. It takes about 10 minutes and works best with short programs.
  • Give your child a coin or button to use as the robot on the grids, and let them tick each block as they trace it so none get missed.

Watch out for

Losing track when following code block by block, missing a step out.
Tick each block as you trace it, or cover the code with a card and slide it down one block at a time.
Mixing up turning left and right, especially when the robot faces down.
Turn the page upside down, or stand up and face the same way as the robot before turning.
Counting how many times a loop repeats wrongly.
Count the rounds of the loop on your fingers as you trace them, and say each round out loud.

Questions from the worksheet

  1. The robot starts facing up. Trace each program. Write the letter where it stops.
  2. This robot starts facing down. Fill in the trace table, then draw its path on the grid.
  3. Predict: where does this robot finish, and which way does it face? Explain how you know.
  4. Sam says, "Turn right moves the robot one square to the right." Is he right? Where does it really stop?

The answers are on the answers sheet, for grown-ups.

National curriculum in England

This worksheet practises this statement from the Years 3–6 computing programme of study:

  • Use logical reasoning to explain how some simple algorithms work and to detect and correct errors in algorithms and programs

Source: National curriculum in England: computing programmes of study (DfE)

In the classroom

  • Project a grid and code, and ask pupils to predict the end square on mini-whiteboards before you trace it together.
  • Play human robot in the hall: pairs write programs on cards, predict, then test by walking them.

Questions and answers

What does tracing code mean?

Tracing code means following a program one instruction at a time to work out what it will do, without running it. Children often use a finger or a counter to move along a grid as they read each block.

What is logical reasoning in Year 3 and Year 4 computing?

Logical reasoning means using clear steps to explain what a program or algorithm will do and why. Predicting where a robot will stop, and explaining it block by block, is a good example.

More worksheets from Sequences and Loops: Code a Robot and Squash the Bugs

More Year 3 technology worksheets

One for every chapter of every game, with answers.

Browse them →