Sequence, selection and iteration together
About this lesson: Sequence, selection and iteration together
In short
This quiz asks 3 questions in a loop, checks each answer with IF, and keeps a score. Choose which answers are right, then run it.

What you'll explore
- A quiz program: All three at once
- This quiz asks 3 questions in a loop, checks each answer with IF, and keeps a score. Choose which answers are right, then run it.
- Name the parts: Sequence, selection, iteration
- Highlight each construct in the quiz program: steps in order (sequence), choices (selection) and repetition (iteration).
- Another example: Count the passes
- This program reads three marks and counts how many are 50 or more. The IF is inside the loop, so it runs once per mark. Change the marks.
- Check yourself: Inside the loop
- An IF statement is inside a FOR loop that runs 5 times.
Also in this lesson
- Common mix-ups
- Combining constructs
- Times-table tester
Words to know
- sequence
- Steps run in order.
- selection
- Choosing steps with IF.
- iteration
- Repeating steps with a loop.
- construct
- A basic building block of programs.
- initialise
- Give a variable its starting value.
Sources
- BBC Bitesize KS3 Computer Science
- Raspberry Pi Foundation, Computing curriculum resources