Year 5 (ages 9–10, Grade 4 in the US) · Computing · Selection · Lesson 1
Conditions and if...then
Selection in programs: conditions, if...then blocks, comparison operators, tracing programs and flowchart decisions.
Exam boards: this lesson matches the AQA and Pearson Edexcel GCSE computing courses. Check which course your school follows.

13-minute video lesson
Teaching, worked examples and 20 practice questions solved step by step.
Watch free for a monthWhat your child will learn
- Explain conditions
- Use if...then
- Trace a program with selection
- Draw decisions in flowcharts
The method
- Condition.
- If block.
- Actions inside.
- Test both.
Key words: selection, condition, if then, flowchart, decision, operator.
Worked examples
Worked examples from the lesson, with every step.
Question 1
Is ‘Is it Monday?’ a condition?
- Step 1: true/false
Answer: yes - it's true or false
Question 2
Is ‘Draw a cat’ a condition?
- Step 1: instruction
Answer: no - it's an instruction, not true/false
Question 3
In the program, what is the condition?
- Step 1: answer = 7
Answer: answer = 7