Year 7 (ages 11–12, Grade 6 in the US) · Computing · Python: first programs · Lesson 5
elif and building a quiz
Using elif for multiple choices, why the order of conditions matters, and building a simple quiz program with a score.
Exam boards: this lesson matches the AQA and Pearson Edexcel GCSE computing courses. Check which course your school follows.

17-minute video lesson
Teaching, worked examples and 20 practice questions solved step by step.
Watch free for a monthWhat your child will learn
- Use if, elif and else
- Order conditions correctly
- Use a score variable
- Test every branch of a program
The method
- Outcomes.
- Order.
- if... elif... else.
- Test every branch.
Key words: elif, selection, condition, score, testing, branch.
Worked examples
Worked examples from the lesson, with every step.
Question 1
What does elif stand for?
- Step 1: else...
Answer: else if
Question 2
How many elifs can you have?
- Step 1: Many
Answer: as many as you need
Question 3
Does else need a condition?
- Step 1: Catch-all
Answer: no