REPEAT…UNTIL post-condition loop
A post-condition loop: the body runs first, then UNTIL tests the condition. It always runs at least once and stops when the condition is TRUE. There is no ENDREPEAT.
Understanding REPEAT…UNTIL post-condition loop in IGCSE Computer Science Paper 2
What it does: Num is already above 5, but the body still runs once and outputs 10 before UNTIL tests the condition. UNTIL both ends the loop and holds the condition. Cambridge pseudocode has no ENDREPEAT. The fix is UNTIL Pin = 1234. The loop then stops when the correct PIN is entered.
Common mistakes: A REPEAT loop is closed by the UNTIL line, which holds the condition. There is no ENDREPEAT keyword. The line should be UNTIL Answer = "Y". REPEAT stands alone on its line. DO belongs to WHILE...DO, not to REPEAT...UNTIL. The line should be just REPEAT.
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 379–388) and word search (Modules 379–398).
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
REPEAT UNTILFill in the Blanks
Spot the Error
Student with a class code? Join your class →