Skip to content
Menu

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.

Whiteboard video lesson: elif and building a quiz

17-minute video lesson

Teaching, worked examples and 20 practice questions solved step by step.

Watch free for a month

What your child will learn

  • Use if, elif and else
  • Order conditions correctly
  • Use a score variable
  • Test every branch of a program

The method

  1. Outcomes.
  2. Order.
  3. if / elif / else.
  4. 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?

  1. Step 1: else...

Answer: else if

Question 2

How many elifs can you have?

  1. Step 1: Many

Answer: as many as you need

Question 3

Does else need a condition?

  1. Step 1: Catch-all

Answer: no