The if-else block
A block that runs the blocks in the first part if the condition is true, and the blocks in the else part if it is false. Two paths, but only one runs.
Understanding The if-else block in Years 5–6 Creating Digital Solutions
What it does: If the answer is not yes, the condition is false, so the sprite says Maybe next time instead of Great!. The sprite either moves or turns, never both, because the condition picks just one path. When the condition is true, only the first part runs. The else part is skipped. If-else gives two choices. Repeating is done with loops such as forever or repeat. The if-else block always checks one condition and then picks one of its two paths.
Common mistakes: The if-else block needs the word then after the condition. Line 2 should be: if <answer = yes> then. The second path of the block is called else, not otherwise. Line 3 should be: else.
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 51–60) and word search (Modules 41–74).
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
if <> then ... else ...Fill in the Blanks
Spot the Error
Student with a class code? Join your class →