Year 7 · 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.

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
The first three practice questions 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