A decision inside a decision
A second IF written inside the THEN or ELSE path of the first IF. It is only checked when that path is taken. Indent it and give each IF its own END IF.
Understanding A decision inside a decision in ACARA Digital Technologies Years 5–6
What it does: The inner END IF closes the key check and the outer END IF closes the coins check, so both IFs are closed. The level = 2 check sits inside ELSE, so it only happens when level is not 1. A nested IF sits inside another IF's path. It is a decision inside a decision. The inner IF is inside the THEN path. If score > 10 is false, the computer skips the whole path, so the inner IF is never checked. Indenting shows which IF is inside which. Every IF needs its own END IF. Each IF has its own END IF. Two IFs means two END IFs.
Common mistakes: The step inside the inner IF is missing the word TO. It should be ' SET bonus TO 10'. This step only runs when both IFs are true. The inner IF is missing THEN. Every IF needs THEN after its condition: ' IF door = open THEN'.
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 85–104) and word search (Modules 73–104).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
nested IFFill in the Blanks
Spot the Error
Student with a class code? Join your class →