ComputingYears 5–9Python

If Statements and Logic

Learn If Statements and Logic for Years 5–9 pupils (ages 9–14). Free practice questions, lessons and worked examples — aligned to the UK National Curriculum.

What you'll learn

  1. 1

    Imagine you're playing a game on your tablet. If you tap the screen, the game starts. If you don't tap, nothing happens!

  2. 2

    What happens if you tap the screen in the game?

  3. 3

    Make a rule for a robot: IF it's raining, THEN take an umbrella. Drag the right action below.

  4. 4

    Let's write an 'if' rule for a computer: IF the light is red, THEN stop.

  5. 5

    In the rule 'IF it is sunny THEN wear a hat', what is the action?

  6. 6

    Write your own rule: IF the doorbell rings, THEN ...

  7. 7

    What comes after 'THEN' in an if-then rule?

Practise If Statements and Logic with Whizlo

Free AI-tutored lessons, unlimited practice questions, and progress tracking for ages 9–14. Aligned to the UK National Curriculum.