New
New
Year 6

Selection to control the flow in a program

I can explain that selection can control the flow of a program.

New
New
Year 6

Selection to control the flow in a program

I can explain that selection can control the flow of a program.

These resources will be removed by end of Summer Term 2025.

Switch to our new teaching resources now - designed by teachers and leading subject experts, and tested in classrooms.

These resources were created for remote use during the pandemic and are not designed for classroom teaching.

Lesson details

Key learning points

  1. Conditions are events that can only be evaluated as True/False or yes/no.
  2. Selection in the form of if/then/else statements can be used to check conditions.
  3. Selection uses conditions to determine program flow.

Keywords

  • Flow - the order in which commands run in a program

  • Condition - a statement that can be either True or False

  • Selection - part of a program where if a condition is met then a set of commands are run

Common misconception

All parts of an if/then/else statement run every time.

Only the part that matches the condition will run.


To help you plan your year 6 computing lesson on: Selection to control the flow in a program, download all teaching resources for free and adapt to suit your pupils' needs...

Model each part of the if/then/else block separately before combining them.
Teacher tip

Equipment

Pupils will need access to a device with block-based programming software that can be used to program a physcial controller. Examples in this lesson use Microsoft MakeCode https://oak.link/makecode

Licence

This content is © Oak National Academy Limited (2025), licensed on Open Government Licence version 3.0 except where otherwise stated. See Oak's terms & conditions (Collection 2).

Lesson video

Loading...

Prior knowledge starter quiz

Download quiz pdf

6 Questions

Q1.
What is a benefit of using an emulator when developing a program?

It makes the code look nicer.
It changes the language of the code.
It increases battery life.
Correct answer: It allows testing without special equipment

Q2.
What does it mean to transfer a program?

to delete it
to change its language
Correct answer: to move it from one place to another
to print it out

Q3.
Put these steps in order for creating and running a program on a micro:bit:

1 - write the program
2 - test on an emulator
3 - transfer to micro:bit
4 - observe physical actions

Q4.
Which describes a micro:bit best?

Correct answer: a simple, programmable computer
a type of printer
a large mainframe
a storage device

Q5.
Match each term to its description:

Correct Answer:micro:bit,a small programmable computer

a small programmable computer

Correct Answer:emulator,a virtual tool for testing code

a virtual tool for testing code

Correct Answer:transfer,moving a program to a new device

moving a program to a new device

Q6.
What happens after you transfer a program to a controllable device?

the program disappears
the device shuts down
Correct answer: the device can carry out actions
the code becomes unreadable

Assessment exit quiz

Download quiz pdf

6 Questions

Q1.
What is a condition in programming?

Correct answer: a statement that can only be True or False
a list of instructions
a type of computer
a way to store data

Q2.
Which part of a program decides which instructions run based on a condition?

loop
variable
Correct answer: selection
output

Q3.
What does the “if” part of an if/then/else statement do?

repeats instructions
Correct answer: checks if a condition is met
stores numbers
draws a picture

Q4.
Match each example to the programming concept:

Correct Answer:selection,deciding if it is raining before going outside

deciding if it is raining before going outside

Correct Answer:flow,the steps followed in a recipe

the steps followed in a recipe

Correct Answer:condition,a statement like “temperature > 20”

a statement like “temperature > 20”

Q5.
Which statement about if/then/else in programming is correct?

both the “then” and “else” parts always run
neither part runs unless the condition is True
the “else” part always runs, no matter what
Correct answer: only the part matching the condition runs

Q6.
Order these actions for making a decision in code:

1 - write a condition
2 - test if it is True or False
3 - run the matching commands
4 - end the selection