Using conditions to build quiz questions
I can explain how selection directs the flow of the program.
Using conditions to build quiz questions
I can explain how selection directs the flow of the program.
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
- Conditions can be used to control program flow.
- A condition can direct program flow in one of two ways.
- Selection in the form of if...then...else statements can be used to check conditions
Keywords
Selection - part of a program where if a condition is met, then a set of commands is run
Condition - a statement that can be either True or False
Outcome - the actions that come from a condition being True or False
Common misconception
The program understands that 'twelve' is the same as '12' in the user input.
The user's input needs to be an exact match to what you put in the condition.
To help you plan your year 5 computing lesson on: Using conditions to build quiz questions, download all teaching resources for free and adapt to suit your pupils' needs...
To help you plan your year 5 computing lesson on: Using conditions to build quiz questions, download all teaching resources for free and adapt to suit your pupils' needs.
The starter quiz will activate and check your pupils' prior knowledge, with versions available both with and without answers in PDF format.
We use learning cycles to break down learning into key concepts or ideas linked to the learning outcome. Each learning cycle features explanations with checks for understanding and practice tasks with feedback. All of this is found in our slide decks, ready for you to download and edit. The practice tasks are also available as printable worksheets and some lessons have additional materials with extra material you might need for teaching the lesson.
The assessment exit quiz will test your pupils' understanding of the key learning points.
Our video is a tool for planning, showing how other teachers might teach the lesson, offering helpful tips, modelled explanations and inspiration for your own delivery in the classroom. Plus, you can set it as homework or revision for pupils and keep their learning on track by sharing an online pupil version of this lesson.
Explore more key stage 2 computing lessons from the Using selection in programming to develop a quiz unit, dive into the full primary computing curriculum, or learn more about lesson planning.
Equipment
Pupils will need access to a device with block-based programming software. Examples in this lesson use Scratch https://oak.link/scratch
Licence
Prior knowledge starter quiz
6 Questions
Q1.What is the main purpose of using repetition in a program?
Q2.Which of these describes an infinite loop?
Q3.In programming, what is an outcome?
Q4.What is the name of the block in programming that repeats a set of instructions without stopping?
Q5.Match each keyword to its description:
running the same instructions more than once
a section of code that runs forever
the actions that come from a condition being True or False
part of a program where if a condition is met, then commands run
Q6.In an if... then... else... statement, what happens if the condition is not met?
Assessment exit quiz
6 Questions
Q1.What does a condition in a program do?
Q2.Why might a program not accept "twelve" as being the same as "12" when checking user input?
Q3.What part of a program checks if something is True or False?
Q4.Which of these is a condition?
Q5.Match the examples to the keywords:
If score equals 10 then show message.
The answer is shown when the condition is met.
The program checks if the user's input matches the rule.
The program chooses between two actions.