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 design a program that uses selection.

      Key learning points

      1. Selection can be used to produce an intended outcome.
      2. User inputs can be used within an algorithm.
      3. Using branching algorithms can help with planning code.

      Keywords

      • Input - in a program, the text or numbers that a user types in

      • Branching algorithm - a decision-making flow used to plan a program with a condition and two outcomes

      Common misconception

      Designing is just extra work.

      Planning reduces how much you have to think about when you are actually coding.

      Teacher tip

      Remind pupils that input must exactly match the condition in their code, and support them to test this by predicting what will happen for both correct and incorrect answers.

      Equipment

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

      Files needed for this lesson

      Quiz design sheet 170.24 KB (PPTX)

      Quiz design sheet example 477.72 KB (PPTX)

      Download these files to use in the lesson.

      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 is a condition in Scratch programming?

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

      Q2.
      What word means choosing between actions in a program?

      Correct Answer: selection

      Q3.
      What is the result called when a program checks a condition?

      Correct Answer: outcome

      Q4.
      Order these steps for how selection works in Scratch:

      1 - The program checks a condition.
      2 - The program decides if the condition is True or False.
      3 - The program runs the ‘then’ command if True.
      4 - The program runs the ‘else’ command if False.

      Q5.
      Match each example to its keyword:

      Correct Answer:event,green flag block

      green flag block

      Correct Answer:condition,score = 5

      score = 5

      Correct Answer:outcome,The sprite says "Well done!" if the answer is right.

      The sprite says "Well done!" if the answer is right.

      Correct Answer:selection,if... then... else...

      if... then... else...

      Q6.
      What is the main purpose of using selection in a program?

      to make the sprite move faster
      to add more sprites
      to change the background
      Correct answer: to choose what happens based on a condition

      6 Questions

      Q1.
      In a branching algorithm, what is the main purpose of using selection?

      Correct answer: to choose between different actions based on a condition
      to make the program run faster
      to add more colours to the screen
      to repeat the same action many times

      Q2.
      Which of the following is an example of an input in a program?

      the background colour
      the name of the project
      Correct answer: the number a user types into a box
      the sound a computer makes

      Q3.
      Why is planning a branching algorithm helpful before starting to code?

      It makes the code look more colourful.
      Correct answer: It helps you understand what decisions the program needs to make.
      It automatically writes the code for you.
      It makes the computer run more quietly.

      Q4.
      What happens if a user’s input does not match the condition in a branching algorithm?

      The program will ignore the input.
      The program will always choose the first outcome.
      The program will stop working.
      Correct answer: The program will follow the alternative outcome.

      Q5.
      Match each example to its keyword:

      Correct Answer:input,The user types their name.

      The user types their name.

      Correct Answer:branching algorithm,a flowchart with 'yes' and 'no' branches

      a flowchart with 'yes' and 'no' branches

      Correct Answer:selection,The program picks what to do based on the answer.

      The program picks what to do based on the answer.

      Correct Answer:outcome,The program shows a message if the answer is correct or not.

      The program shows a message if the answer is correct or not.

      Q6.
      What is the first thing you should do when designing a program that uses selection?

      Draw a picture.
      Play a sound.
      Correct answer: Decide what inputs you need.
      Change the text colour.

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