← VCE Pseudocode

else if: chained selection

A keyword that adds another condition to check if the previous IF or ELSE IF condition was false

Understanding else if: chained selection in VCE Pseudocode

What it does: This description matches ELSE IF, used to test further conditions in sequence. Regardless of how many ELSE IF branches exist, the chain closes with one END IF. ELSE IF adds another condition to check only if the earlier condition in the chain was false. Every ELSE IF needs a condition followed by THEN, just like an initial IF. ELSE IF is written as two separate words, not joined together. Once a condition in the chain evaluates true, its branch runs and the rest of the chain is skipped. Writing ELSEIF as one word is incorrect — VCAA pseudocode requires ELSE IF as two words.

Common mistakes: ELSE IF must be written as two separate words, not ELSEIF. VCAA pseudocode uses DISPLAY to output a value, not PRINT.

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–28) and word search (Modules 1–28).

Take this worksheet further — free with Cloodit

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

Learning
Duo
Does ELSE IF let an algorithm check another condition after the first was false?
TrueFalse
Matches
IF x = 1 THEN DISPLAY "One" ELSEIF x = 2 THEN DISPLAY "Two"
↓
ELSE IF must be written as two separate words, not ELSEIF
Applying
Meanings
Term
ELSE IF
Meaning
A keyword that adds another condition to check if the previous IF or ELSE IF condition was false
Practice
BEGIN
Testing
Gaps
x > 50 THEN
Check Answer
Spots
1ELSEIF x > 5 THEN
2 DISPLAY "Medium"

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

The 'Hermit Crab' badge — Definition Collector, 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. Does ELSE IF let an algorithm check another condition after the first was false?
A. True ✓
B. False
ELSE IF adds another condition to check only if the earlier condition in the chain was false.
2. Must each ELSE IF include its own condition and THEN?
A. True ✓
B. False
Every ELSE IF needs a condition followed by THEN, just like an initial IF.
3. Is ELSEIF written as one word in VCAA pseudocode?
A. True
B. False ✓
ELSE IF is written as two separate words, not joined together.
4. Does a chain stop checking conditions once one is found true?
A. False
B. True ✓
Once a condition in the chain evaluates true, its branch runs and the rest of the chain is skipped.
5. Does the final ELSE in a chain need its own condition?
A. False ✓
B. True
The final ELSE has no condition — it catches whatever hasn't matched any earlier branch.

Match the Pairs

ELSE IF mark >= 60 THEN → Checks another condition after the first one was false
ELSE DISPLAY "C" → The final branch that runs when no earlier condition matched
A keyword used to chain another condition onto a selection block → ELSE IF
The single keyword pair that closes an entire chained selection block → END IF
IF x = 1 THEN DISPLAY "One" ELSEIF x = 2 THEN DISPLAY "Two" → ELSE IF must be written as two separate words, not ELSEIF
IF n < 5 THEN DISPLAY "Small" ELSE IF n < 10 DISPLAY "Medium" → The ELSE IF condition is missing THEN after it

Key Term

ELSE IF
A keyword that adds another condition to check if the previous IF or ELSE IF condition was false

Fill in the Blanks

1. IF x > 90 THEN DISPLAY "A" ELSE IF x > 50 THEN
Hint: Type the keyword pair that checks another condition after the first one was false
2. ELSE IF y < 10 THEN DISPLAY "Low" END IF
Hint: Type the keywords that close the whole selection chain
3. ELSE IF a = 2 THEN DISPLAY "Two" ELSE
Hint: Type the keyword for the final catch-all branch with no condition
4. ELSE IF score >= 70 THEN
Hint: Type the keyword that must follow the condition
5. ELSE IF n = 3 THEN
Hint: Type the keyword pair used to check another condition in a chain

Spot the Error

Question 1
A ELSEIF x > 5 THEN
B DISPLAY "Medium"
C ELSE
D DISPLAY "Small"
Line A — ELSE IF must be written as two separate words, not ELSEIF.
Question 2
A IF a = 1 THEN
B PRINT "One"
C ELSE IF a = 2 THEN
D DISPLAY "Two"
Line B — VCAA pseudocode uses DISPLAY to output a value, not PRINT.
Question 3
A IF score >= 90 THEN
B DISPLAY "A"
C ELSE IF score >= 70
D DISPLAY "B"
Line C — The ELSE IF condition is missing THEN — it should read ELSE IF score >= 70 THEN.
Question 4
A IF code = 1 THEN
B DISPLAY "Type A"
C ELSE IF code = 2 THEN
D DISPLAY("Type B")
Line D — DISPLAY should not use parentheses; it should be written as DISPLAY "Type B".
Question 5
A IF hour < 12 THEN
B DISPLAY "Morning"
C ELSE IF hour < 18 THEN
D DISPLAY "Afternoon"
E ENDIF
Line E — The closing keyword should be written as END IF, not ENDIF.

Student with a class code? Join your class →