← VCE Pseudocode

Repeat-Until loop

A loop that repeats its instructions and checks the condition after each repetition, so the body always runs at least once

Understanding Repeat-Until loop in VCE Pseudocode

What it does: This description matches a REPEAT-UNTIL loop, a post-test loop. REPEAT begins the loop, marking where the repeated instructions start. UNTIL introduces the condition that is checked at the end of each repetition. The loop keeps repeating until the UNTIL condition evaluates to true, at which point it stops. VCAA pseudocode uses the arrow ← for assignment, not the equals sign.

Common mistakes: A REPEAT-UNTIL loop closes with UNTIL followed by the condition, not END UNTIL. 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 a REPEAT-UNTIL loop's body always run at least once?
TrueFalse
Matches
count ← 0 REPEAT DISPLAY count count ← count + 1 END UNTIL count = 3
↓
The loop should close with UNTIL and its condition, not END UNTIL
Applying
Meanings
Term
REPEAT ... UNTIL condition
Meaning
A loop that repeats its instructions and checks the condition after each repetition, so the body always runs at least once
Practice
BEGIN
Testing
Gaps
Check Answer
Spots
4 count ← count + 1
5END UNTIL count > 5

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

The 'Chameleon' badge — Type Shifter, 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 a REPEAT-UNTIL loop's body always run at least once?
A. True ✓
B. False
Since the condition is checked after the loop body runs, REPEAT-UNTIL always executes the body at least once.
2. Which keyword introduces the condition checked after each repetition?
A. UNTIL ✓
B. WHILE
UNTIL introduces the condition that is checked at the end of each repetition.
3. Does a REPEAT-UNTIL loop check its condition before or after the loop body runs?
A. Before
B. After ✓
REPEAT-UNTIL is a post-test loop, checking the condition after the body has run.
4. Does a REPEAT-UNTIL loop stop once its UNTIL condition becomes true?
A. True ✓
B. False
The loop keeps repeating until the UNTIL condition evaluates to true, at which point it stops.
5. Is REPEAT-UNTIL a pre-test or post-test loop?
A. Pre-test
B. Post-test ✓
REPEAT-UNTIL checks its condition after the loop body, making it a post-test loop.

Match the Pairs

REPEAT DISPLAY count count ← count + 1 UNTIL count > 5 → A loop that runs its body at least once before checking a condition
UNTIL count > 5 → Checks a condition after the loop body has run
A loop guaranteed to run its body at least once → REPEAT-UNTIL loop
The keyword that marks the start of the loop body → REPEAT
count ← 0 REPEAT DISPLAY count count ← count + 1 END UNTIL count = 3 → The loop should close with UNTIL and its condition, not END UNTIL
n ← 1 REPEAT DISPLAY n n = n + 1 UNTIL n > 5 → Assignment should use ←, not =

Key Term

REPEAT ... UNTIL condition
A loop that repeats its instructions and checks the condition after each repetition, so the body always runs at least once

Fill in the Blanks

1. REPEAT DISPLAY count
Hint: Type the keyword that starts a repeat-until loop
2. REPEAT DISPLAY count UNTIL count > 5
Hint: Type the keyword that introduces the condition checked after each repetition
3. UNTIL count > 5
Hint: Type the operator that checks if count is greater than 5
4. A REPEAT-UNTIL loop is a post-test loop
Hint: Type the word describing when the condition is checked, relative to the loop body
5. REPEAT-UNTIL loops always run at least once
Hint: Type the word for how many times the body is guaranteed to run

Spot the Error

Question 1
A count ← 1
B REPEAT
C DISPLAY count
D count ← count + 1
E END UNTIL count > 5
Line E — A REPEAT-UNTIL loop closes with UNTIL followed by the condition, not END UNTIL.
Question 2
A x ← 10
B REPEAT
C PRINT x
D x ← x - 1
E UNTIL x = 0
Line C — VCAA pseudocode uses DISPLAY to output a value, not PRINT.
Question 3
A total ← 0
B REPEAT
C total ← total + 10
D WHILE total < 100
Line D — A REPEAT loop must close with UNTIL and its condition, not WHILE.
Question 4
A n ← 1
B REPEAT
C DISPLAY n
D n = n + 1
E UNTIL n > 5
Line D — Assignment in pseudocode uses ←, not =.
Question 5
A count ← 0
B REPEAT
C DISPLAY count
D count ← count + 1
E UNTIL count = 3
Line F — There is no incorrect line here — all lines follow correct REPEAT-UNTIL syntax.

Student with a class code? Join your class →