New
New
Year 6

Conditional statements

I can use a conditional statement to compare a variable to a value.

New
New
Year 6

Conditional statements

I can use a conditional statement to compare a variable to a value.

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 can be checked with <,> and = operators.
  2. The order of conditions in selection statements can affect the outcome.
  3. Programs can be modified to produce different outcomes.

Keywords

  • Condition - a statement that can be either true or false

  • Operator - a symbol used to compare values

Common misconception

The order of conditions in an if/else if chain doesn't matter.

Conditions are checked in order, so earlier ones take priority.


To help you plan your year 6 computing lesson on: Conditional statements, download all teaching resources for free and adapt to suit your pupils' needs...

It is important to draw attention to the order of conditions in if/else if chains.
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 word means choosing between actions in a program?

Correct Answer: selection

Q2.
Arrange these steps for using an if... then... else statement:

1 - The program checks the condition.
2 - If the condition is true, it runs the “then” commands.
3 - If the condition is false, it runs the “else” commands.
4 - The program continues.

Q3.
What happens in an if... then... else statement if the condition is false?

The program does nothing.
Correct answer: The “else” commands are run.
The “then” commands are run.
The program repeats.

Q4.
Match the keyword to its description:

Correct Answer:flow,the order commands run in a program

the order commands run in a program

Correct Answer:condition,a rule that can be true or false

a rule that can be true or false

Correct Answer:selection,choosing between different actions

choosing between different actions

Correct Answer:if...then...else statement,a structure that checks a condition and picks what to do

a structure that checks a condition and picks what to do

Q5.
Which of these best describes a program’s flow?

Correct answer: the order commands are carried out
the number of conditions
the way the program looks
the sound it makes

Q6.
What does selection use to decide which commands to run?

a picture
the name of the program
the time of day
Correct answer: a condition

Assessment exit quiz

Download quiz pdf

6 Questions

Q1.
What is an operator in a conditional statement?

a type of variable
the name of a program
a background image
Correct answer: a symbol used to compare values

Q2.
Which of these is a condition?

Correct answer: 7 > 5
play sound
draw a circle
add a sprite

Q3.
Which operator checks that an initial value is greater than the next value?

Correct Answer: >

Q4.
What happens if none of the conditions in an if... else if... statement are true?

The program always runs the first action.
The program crashes.
Correct answer: The program skips to the else part at the end of the statement.
The program repeats the statement.

Q5.
Which statement about if... else if... statements is correct?

All conditions can run if they are true.
Correct answer: Only the first true condition’s outcome will run.
The last condition always runs.
The order does not affect the outcome.

Q6.
Arrange these steps to show how a program uses if... else if... statements to decide what to do:

1 - The program checks the first condition.
2 - If the first condition is true, its first outcome runs.
3 - If the first condition is false, it checks the next condition.
4 - If the next condition is true, its outcome runs for that condition.
5 - If no conditions are true, the program runs the outcome for the else statement.

Additional material

Download additional material