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

      Conditions in selection statements

      Lesson details

      Learning outcome

      I can explain how selection is used in computer programs.

      Key learning points

      1. Conditions are events that can only be evaluated as True/False or yes/no.
      2. A condition being met can be used to start an action.
      3. Conditions are used in selection.

      Keywords

      • 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 is run

      Common misconception

      A condition only needs to be checked once.

      Conditions need to be constantly checked to make sure the program reacts when the rule is met.

      Teacher tip

      Emphasise that conditions are used in programming to control which actions are followed, and highlight that in this lesson, only one outcome will run depending on whether the condition is met.

      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.
      What do you call a character or object you can program in Scratch?

      Correct Answer: sprite

      Q2.
      Match the block to its function:

      Correct Answer:move,changes position

      changes position

      Correct Answer:repeat,runs code a set number of times

      runs code a set number of times

      Correct Answer:forever,endless repetition

      endless repetition

      Correct Answer:if on edge, bounce,reverses direction at the stage edge

      reverses direction at the stage edge

      Q3.
      Which block creates a loop that never ends?

      repeat
      Correct answer: forever
      move
      if on edge, bounce

      Q4.
      Which of these is not a type of loop in Scratch?

      forever
      repeat
      Correct answer: if on edge, bounce
      repeat until

      Q5.
      Put these steps in order to make a sprite move and bounce off the edge:

      1 - go to starting position
      2 - forever loop
      3 - move steps
      4 - if on edge, bounce

      Q6.
      Match the key words and definitions.

      Correct Answer:algorithm,a precise sequence of steps that can be followed to do a task

      a precise sequence of steps that can be followed to do a task

      Correct Answer:repetition,a program where one or more commands are run multiple times in a loop

      a program where one or more commands are run multiple times in a loop

      Correct Answer:debug,finding and fixing errors in a program

      finding and fixing errors in a program

      6 Questions

      Q1.
      What is a condition in a computer program?

      a list of instructions
      a type of sprite
      a sound effect
      Correct answer: a statement that can be True or False

      Q2.
      Why are conditions important in selection?

      They make the sprite move faster.
      Correct answer: They decide which actions to run.
      They change the background.
      They create new blocks.

      Q3.
      What does selection allow a program to do?

      Correct answer: choose actions based on a condition
      repeat actions forever
      change the sprite’s colour
      play a sound

      Q4.
      Arrange the steps to use selection in a Scratch program:

      1 - decide what condition to check
      2 - place an "if" block in the code
      3 - add actions inside the "if" block
      4 - run the program

      Q5.
      What would happen if a program only checked a condition once?

      It would always respond correctly.
      Correct answer: It might miss changes that happen later.
      The program would run faster.
      The sprite would stop moving.

      Q6.
      Match the keyword to its meaning:

      Correct Answer:condition,a statement that can be yes or no

      a statement that can be yes or no

      Correct Answer:selection,part of a program that chooses actions

      part of a program that chooses actions

      Correct Answer:True,the condition has been met

      the condition has been met

      Correct Answer:False,the condition has not been met

      the condition has not been met


      To help you plan your 5 computing lesson on: Conditions in selection statements, download all teaching resources for free and adapt to suit your pupils' needs...