Predicting programs worksheet for Years 3–6: Predict the program

Members Chapter 4 of If and Else in Coding: Make Choices with Bit the Robot · Year 3, Year 4, Year 5 · 3 pages · PDF, A4

All 5 worksheets in this game

One for each chapter

Predict the Program is a printable computing worksheet for Years 3 to 6 (ages 7 to 11) that teaches children to read a short program with if and else, predict what it will do for a given input, and explain why. It follows the KS2 national curriculum in England for computing: use logical reasoning to explain how some simple algorithms work.

  • 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: True or false conditions (chapter 1).

The game for this worksheet If and Else in Coding: Make Choices with Bit the Robot Chapter 4 · Explaining programs: predict what an if-else program will do · read aloud ▶ Play chapter 4 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

Teaches children to read a short if-else program block by block, predict exactly what it will do for a given input, and explain why. Includes a be-the-computer game with program cards and an answers sheet.

Page 1 · Learn
A program traced step by step on a sunny day, then a worked example predicting the same program on a rainy day. A warm-up asks what a program says on a Monday.
Page 2 · Try it together
Be the computer: the child predicts the actions on two program cards, then acts them out as the grown-up reads each block aloud, with a cup as one input.
Pages 2–3 · Practise
Predict a morning program for two days, fill in Gold or Silver for four scores, spot the output that can't happen, and explain why a program never says both answers.
Answers sheet
Every answer by page, what to watch out for (both parts, the wrong part, forgetting blocks before and after) and quick ideas to go further.

3 A4 pages and an answers sheet · about 30 minutes

Using it at home

  • Ask your child to point at each block and say "runs" or "skipped" as they predict. It slows them down and catches missed blocks.
  • In Be the computer, let your child write the prediction before you read the card. Then act it out together and check.

Watch out for

Thinking both the if part and the else part run.
Ask: "Was the condition true or false? So which one part runs?"
Forgetting that the blocks before and after an if-else still run, in order.
Point at every block from the top, saying "runs" or "skipped". Only the parts inside the if-else are a choice.
Picking the else part when the condition is true.
Say the condition aloud and answer it first, then point: true goes to then, false goes to else.

Questions from the worksheet

  1. Predict everything the program says, in order, on a Wednesday in term time and on a Sunday.
  2. If score is more than 5, say "Gold", else say "Silver", then say "Next round". What does it say for a score of 5?
  3. Three children write down what a program said. Ring the one that can't happen, and say why.
  4. Explain why the program never says both "Park" and "Library". Use the words condition and because.
  5. Ava predicts that on a rainy day the program says just "Library". Is Ava right? What has she forgotten?

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

  • Use Be the computer at the front of the class: one child acts, the class predicts on mini whiteboards first.
  • Set C (the output that can't happen) makes a good talk-partner question at the end of a lesson.

Questions and answers

How do you predict what a program will do?

Read it like a computer: one block at a time from top to bottom. At an if-else, check the condition, follow only the matching part, then carry on with the next block.

Why do children explain programs in KS2 computing?

Explaining why a program does something shows they understand how it works, not just what it does. It also helps them spot and fix bugs later.

More worksheets from If and Else in Coding: Make Choices with Bit the Robot

More Year 3 technology worksheets

One for every chapter of every game, with answers.

Browse them →