Choose exam board for KS4 Computer Science (GCSE)
Choose exam board for KS4 English
Choose exam board for KS4 French
Choose exam board for KS4 Geography
Choose exam board for KS4 German
Choose exam board for KS4 History
Choose tier for KS4 Maths
Choose exam board for KS4 Music
Choose exam board for KS4 Physical education (GCSE)
Choose exam board for KS4 Religious education (GCSE)
Choose exam board for KS4 Spanish

      Lesson details

      Learning outcome

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

      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.

      Teacher tip

      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.

      Equipment

      Pupils will need access to a device with block-based programming software. Examples in this lesson use Scratch https://oak.link/scratch

      Licence

      This content is © Oak National Academy Limited (2026), 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

      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 is a project of the Scratch Foundation. It is available for free at https://scratch.org. OR ScratchJr is a project of the Scratch Foundation. It is available for free at https://scratchjr.org. OR Scratch Foundation under CC BY-SA 2.0 Q5 image 1 Scratch is a project of the Scratch Foundation. It is available for free at https://scratch.org. OR ScratchJr is a project of the Scratch Foundation. It is available for free at https://scratchjr.org. OR Scratch Foundation under CC BY-SA 2.0 Q5 image 2 Scratch is a project of the Scratch Foundation. It is available for free at https://scratch.org. OR ScratchJr is a project of the Scratch Foundation. It is available for free at https://scratchjr.org. OR Scratch Foundation under CC BY-SA 2.0 Q6 Scratch is a project of the Scratch Foundation. It is available for free at https://scratch.org. OR ScratchJr is a project of the Scratch Foundation. It is available for free at https://scratchjr.org.

      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 is a project of the Scratch Foundation. It is available for free at https://scratch.org. OR ScratchJr is a project of the Scratch Foundation. It is available for free at https://scratchjr.org. OR Scratch Foundation under CC BY-SA 2.0 Q2 image 2 Scratch is a project of the Scratch Foundation. It is available for free at https://scratch.org. OR ScratchJr is a project of the Scratch Foundation. It is available for free at https://scratchjr.org. OR Scratch Foundation under CC BY-SA 2.0 Q3 image 1 Scratch is a project of the Scratch Foundation. It is available for free at https://scratch.org. OR ScratchJr is a project of the Scratch Foundation. It is available for free at https://scratchjr.org. OR Scratch Foundation under CC BY-SA 2.0 Q3 image 2 Scratch is a project of the Scratch Foundation. It is available for free at https://scratch.org. OR ScratchJr is a project of the Scratch Foundation. It is available for free at https://scratchjr.org. Q3 image 3 Scratch is a project of the Scratch Foundation. It is available for free at https://scratch.org. OR ScratchJr is a project of the Scratch Foundation. It is available for free at https://scratchjr.org. OR Scratch Foundation under CC BY-SA 2.0 Q3 image 4 Scratch is a project of the Scratch Foundation. It is available for free at https://scratch.org. OR ScratchJr is a project of the Scratch Foundation. It is available for free at https://scratchjr.org. OR Scratch Foundation under CC BY-SA 2.0

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