icon-background-square
New
New
Year 7

Selection

I can use condition statements in selection to control the path a program follows.

icon-background-square
New
New
Year 7

Selection

I can use condition statements in selection to control the path a program follows.

warning

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.

Lesson details

Key learning points

  1. Conditions are built using expressions that evaluate to either True or False.
  2. Selection provides program control where there is more than one path to follow.

Keywords

  • Expression - a combination of logical and comparison operators that result to True or False

  • Selection - used when there is more than one possible path for a program to follow

  • If statement - used to carry out selection in a program

  • If block - used to carry out selection in Scratch

Common misconception

A program can only follow one sequence of commands.

Selection allows for a program to follow alternative paths depending on the criteria of the selection statement.

Use of a deck of playing cards can involve more of the class when understanding selection based on rank, suit and colour. Pupils could each have a card and stand up or sit down depending on the card they are holding and the condition being presented.
speech-bubble
Teacher tip
equipment-required

Equipment

All pupils require access to devices that have or can access the online version of Scratch. Starter programs are linked to the lesson and can be remixed as required.

copyright

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...

6 Questions

Q1.
A is a named piece of data, stored in a memory location in a computer.
Correct Answer: variable
Q2.
A variable can hold __________ one value at a time.
more than
Correct answer: only
Q3.
Name one variable in this block of code.
An image in a quiz
Correct Answer: name, music, answer
Q4.
Which category of code block do you need to create a subroutine?
Correct answer: My blocks
Control
Events
Sensing
Q5.
Which block would you use to update the value of the temperature variable in Scratch?
Correct Answer: An image in a quiz
An image in a quiz
An image in a quiz
Q6.
What is the value of temperature at the end of this block of code?
An image in a quiz
Correct answer: 6
10
0
5
Q3 Scratch Foundation under CC BY-SA 2.0 Q5 image 1 Scratch Foundation under CC BY-SA 2.0 Q5 image 2 Scratch Foundation under CC BY-SA 2.0 Q6 Scratch Foundation under CC BY-SA 2.0

4 Questions

Q1.
is used when there is more than one possible path for a program to follow.
Correct Answer: Selection, if statement, if block
Q2.
Which of these is the less than operator block?
Correct Answer: An image in a quiz
An image in a quiz
An image in a quiz
Q3.
Which block is used to carry out selection in Scratch?
An image in a quiz
Correct Answer: An image in a quiz
An image in a quiz
An image in a quiz
An image in a quiz
Q4.
Which of these blocks would you use if you want an operation to happen if the expression evaluates as False?
if
Correct answer: if else
forever
repeat
Q2 image 1 Scratch Foundation under CC BY-SA 2.0 Q2 image 2 Scratch Foundation under CC BY-SA 2.0 Q3 image 1 Scratch Foundation under CC BY-SA 2.0 Q3 image 2 Scratch Foundation under CC BY-SA 2.0 Q3 image 3 Scratch Foundation under CC BY-SA 2.0 Q3 image 4 Scratch Foundation under CC BY-SA 2.0