If else selection worksheet for Years 3–6: If, then, else

Members Chapter 2 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

If, Then, Else is a printable computing worksheet for Years 3 to 6 (ages 7 to 11) that teaches children to use if and else so a program chooses between two actions, knowing that only one of them runs. It follows the KS2 national curriculum in England for computing: use sequence, selection, and repetition in 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: True or false conditions (chapter 1).

The game for this worksheet If and Else in Coding: Make Choices with Bit the Robot Chapter 2 · Selection with if and else: choosing between two actions · read aloud ▶ Play chapter 2 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 how if and else let a program choose between two actions, and that only one of them runs. Includes an if-else action game with a spoon and a sock, block puzzles and an answers sheet.

Page 1 · Learn
A flowchart and the same choice as if-else blocks, then a worked example of a garden robot finding dry soil. A warm-up asks what to wear on a sunny and a rainy day.
Page 2 · Try it together
If-else action game: the child is the program and follows a rule like "if the spoon is held up, then clap, else stamp" for four rounds, then writes a new rule.
Pages 2–3 · Practise
Say what a smart lamp does, complete a big-or-small table, fill in the blocks for a road crossing, and write your own morning rule. Then a challenge about both parts running.
Answers sheet
Every answer by page, what to watch out for (both parts running, the wrong part, edge numbers like 10) and quick ideas to go further.

3 A4 pages and an answers sheet · about 30 minutes

Using it at home

  • Play the action game before the Practise pages: being the program makes it obvious that you clap or stamp, never both. Let your child make the next rule.
  • Read every if-else aloud as one sentence: "If it is dark, then switch the lamp on, else switch it off."

Watch out for

Thinking both the if part and the else part run.
Act it out: clap or stamp, never both. The word else means "otherwise".
Picking the else part when the condition is true, or the if part when it is false.
Say the condition, answer true or false aloud, then point: true goes to the then part, false to the else part.
Saying "big" for 10 when the condition is "more than 10".
10 is not more than 10, so the condition is false and the else part runs.

Questions from the worksheet

  1. A smart lamp runs: if is it dark? then switch the lamp on, else switch the lamp off. What does it do at midday?
  2. If the number is more than 10, say "big", else say "small". What does it say for 10?
  3. Fill in the blocks for a robot at a crossing: cross the road, wait, is the green person showing?
  4. Write your own if-else rule for getting ready in the morning.
  5. Mia says: "If the condition is true, the then part runs, and then the else part runs too." Is Mia right?

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 sequence, selection, and repetition in programs; work with variables and various forms of input and output

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

In the classroom

  • Run the if-else action game as a whole class, with you holding up objects and the class as the program.
  • Use set B as a quick mini-whiteboard check, leaving 10 until last for discussion.

Questions and answers

What is selection in programming?

Selection is when a program chooses what to do by checking a condition. If and else are the usual way to do it: if the condition is true one action runs, else the other runs.

Can both the if and the else part run?

No. Only one part of an if-else runs each time: the then part when the condition is true, or the else part when it is false.

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 →