← Years 5–6 Creating Digital Solutions

Choosing between several paths

Checks another condition when the first one is false, so an algorithm can pick from more than two paths. Conditions are checked in order and only one path runs.

Understanding Choosing between several paths in Years 5–6 Creating Digital Solutions

What it does: If the score is 95, the first condition is true so Show A runs and the ELSE IF is skipped. One IF, one ELSE IF and one ELSE make three different paths, and only one of them runs. ELSE IF gives the algorithm another condition to check. It only gets checked if the condition before it was false. IF is one path, ELSE IF is a second path and ELSE is a third path. ELSE IF lets us choose from more than two paths. A final ELSE has no condition. It covers every case the earlier checks did not match.

Common mistakes: Conditions are checked in order. A score of 95 is at least 50, so it would get Silver and never reach the Gold check. The line should be IF score >= 90 THEN. The IF line is missing the word THEN. It should be IF weather = "rainy" THEN.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 11–20) and word search (Modules 1–20).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
What does ELSE IF do in an algorithm?
Checks another condition when the first one is falseRepeats the steps again and again
Matches
IF mark >= 80 THEN Say Great ELSE IF Say Good job
↓
The ELSE IF has no condition. It needs one, such as ELSE IF mark >= 50 THEN.
Applying
Meanings
Term
ELSE IF
Meaning
Checks another condition when the first one is false, so an algorithm can pick from more than two paths. Conditions are checked in order and only one path runs.
Practice
IF weather = raining THEN
Testing
Gaps
temp > 20 THEN DISPLAY "Warm"
Check Answer
Spots
1SET score TO 95
2IF score >= 50 THEN

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Starfish' badge — Five-Point Star, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. What does ELSE IF do in an algorithm?
A. Checks another condition when the first one is false ✓
B. Repeats the steps again and again
ELSE IF gives the algorithm another condition to check. It only gets checked if the condition before it was false.
2. An algorithm has IF, ELSE IF and ELSE. How many paths can it choose from?
A. Only two paths
B. Three paths ✓
IF is one path, ELSE IF is a second path and ELSE is a third path. ELSE IF lets us choose from more than two paths.
3. IF it is raining THEN take an umbrella. ELSE IF it is sunny THEN wear a hat. It is raining and sunny at once. What happens?
A. Take an umbrella AND wear a hat, because both are true
B. Take an umbrella, because the first true condition is the one that runs ✓
Conditions are checked in order. Once one is true, that path runs and the rest are skipped. Only one path runs.
4. In what order does the algorithm check the conditions?
A. In order, from the top down ✓
B. All at the same time
The first condition is checked first. If it is false, the algorithm moves down to the next ELSE IF.
5. What is the job of the final ELSE?
A. A catch-all that runs when none of the conditions are true ✓
B. It checks one more condition before it runs
ELSE has no condition. It runs only when the IF and every ELSE IF before it were false.

Match the Pairs

ELSE IF temperature < 25 THEN → Checks a second condition only when the first condition was false
ELSE Wear a t-shirt → A catch-all path that runs when none of the conditions above were true
Conditions are checked in order from the top, and only the first true one runs → IF score >= 90 THEN Show A ELSE IF score >= 70 THEN Show B
Using ELSE IF lets an algorithm choose between three paths: hot, mild or cold → IF temp > 30 THEN Stay inside ELSE IF temp > 20 THEN Go to the park ELSE Wear a jacket
IF mark >= 80 THEN Say Great ELSE IF Say Good job → The ELSE IF has no condition. It needs one, such as ELSE IF mark >= 50 THEN.
IF age < 5 THEN Say Toddler ELSE Say Child ELSE IF age < 13 THEN Say Kid → The ELSE is before the ELSE IF. The catch-all ELSE must be last, otherwise the ELSE IF can never be checked.

Key Term

ELSE IF
Checks another condition when the first one is false, so an algorithm can pick from more than two paths. Conditions are checked in order and only one path runs.

Fill in the Blanks

1. IF temp > 30 THEN DISPLAY "Hot" ELSE IF temp > 20 THEN DISPLAY "Warm" ELSE DISPLAY "Cold"
Hint: Type the two-word keyword that checks another condition when the first one is false
2. IF mark >= 80 THEN grade ← "A" ELSE IF mark >= 50 THEN grade ← "B" ELSE grade ← "C"
Hint: Type the keyword for the catch-all path that runs when none of the conditions are true
3. IF light = "red" THEN DISPLAY "Stop" ELSE IF light = "yellow" THEN DISPLAY "Slow" ELSE DISPLAY "Go"
Hint: Type the keyword that comes after an ELSE IF condition and starts the action
4. IF coins >= 10 THEN DISPLAY "Big" ELSE IF coins >= 5 THEN DISPLAY "Medium" ELSE DISPLAY "Small"
Hint: Type the operator that means 'greater than or equal to' for the second check
5. IF weather = "rain" THEN DISPLAY "Coat" ELSE IF weather = "sun" THEN DISPLAY "Hat" ELSE DISPLAY "Jumper"
Hint: Type the keyword that follows ELSE to ask a new question about the weather

Spot the Error

Question 1
A SET score TO 95
B IF score >= 50 THEN
C SAY "Gold"
D ELSE IF score >= 50 THEN
E SAY "Silver"
F ELSE SAY "Bronze"
Line B — Conditions are checked in order. A score of 95 is at least 50, so it would get Silver and never reach the Gold check. The line should be IF score >= 90 THEN.
Question 2
A IF weather = "rainy"
B SAY "Take an umbrella"
C ELSE IF weather = "sunny" THEN
D SAY "Wear sunscreen"
E ELSE
F SAY "Wear a jacket"
Line A — The IF line is missing the word THEN. It should be IF weather = "rainy" THEN.
Question 3
A IF light = "red" THEN
B SAY "Stop"
C ELSE light = "yellow" THEN
D SAY "Slow down"
E ELSE
F SAY "Go"
Line C — To check another condition you need the words ELSE IF together. The line should be ELSE IF light = "yellow" THEN.
Question 4
A SET speed TO 45
B IF speed < 60 THEN
C SAY "Too fast"
D ELSE IF speed > 40 THEN
E SAY "Just right"
F ELSE SAY "Too slow"
Line B — The comparison points the wrong way. Speed 45 is less than 60, so it would say Too fast. The line should be IF speed > 60 THEN.
Question 5
A IF pet = "dog" THEN
B SAY "Take it for a walk"
C IF pet = "fish" THEN
D SAY "Clean the tank"
E ELSE
F SAY "Give it a cuddle"
Line C — This should be ELSE IF. A plain IF starts a new check, so a dog would get the walk and also the cuddle. With ELSE IF only one path runs.

Student with a class code? Join your class →