← VCE Pseudocode

for loop: for i from 1 to n

A loop that repeats its instructions a fixed number of times, counting the variable i from 1 up to n

Understanding for loop: for i from 1 to n in VCE Pseudocode

What it does: This description matches a FOR loop, which counts through a fixed range. TO specifies the ending value in a FOR loop's range. END FOR marks the end of the loop block in VCAA pseudocode. The closing keyword is written as two words: END FOR. DISPLAY is followed directly by the value or string, without parentheses. The loop variable can be named anything meaningful, such as count or j. This line begins a FOR loop, setting the loop variable's start and end values. END FOR marks where the loop's repeated instructions end.

Common mistakes: The keywords are in the wrong order — it should read FOR i FROM 1 TO 10. 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 FOR loop repeat a block of instructions a fixed number of times?
TrueFalse
Matches
FOR i FROM 1 TO 10 DISPLAY i ENDFOR
↓
The closing keyword should be written as END FOR, not ENDFOR
Applying
Meanings
Term
FOR i FROM 1 TO n
Meaning
A loop that repeats its instructions a fixed number of times, counting the variable i from 1 up to n
Practice
BEGIN
Testing
Gaps
i FROM 1 TO 5
Check Answer
Spots
1FOR i TO 1 FROM 10
2 DISPLAY i

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

The 'Badger' badge — Determined Digger, 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 FOR loop repeat a block of instructions a fixed number of times?
A. False
B. True ✓
A FOR loop counts a variable from a starting value to an ending value, repeating its instructions for each count.
2. Which keyword sets the starting value of the loop variable?
A. FROM ✓
B. TO
FROM specifies the starting value that the loop variable counts from.
3. Which keyword sets the ending value of the loop variable?
A. TO ✓
B. FROM
TO specifies the ending value that the loop variable counts up to.
4. Should a FOR loop be closed with END FOR?
A. No
B. Yes ✓
END FOR marks the end of the loop block in VCAA pseudocode.
5. Is ENDFOR written as one word in VCAA pseudocode?
A. False ✓
B. True
The closing keyword is written as two words: END FOR.

Match the Pairs

FOR i FROM 1 TO 10 → Starts a loop counting i from 1 up to 10
END FOR → Closes a FOR loop block
A structure that repeats instructions a fixed number of times → FOR loop
The keyword that sets where the loop variable stops counting → TO
FOR i FROM 1 TO 10 DISPLAY i ENDFOR → The closing keyword should be written as END FOR, not ENDFOR
FOR j FROM 1 TO 5 j = j + 1 END FOR → Assignment in pseudocode should use ←, not =

Key Term

FOR i FROM 1 TO n
A loop that repeats its instructions a fixed number of times, counting the variable i from 1 up to n

Fill in the Blanks

1. FOR i FROM 1 TO 5
Hint: Type the keyword that starts the loop
2. FOR i FROM 1 TO 5
Hint: Type the keyword that sets the starting value
3. FOR i FROM 1 TO 5
Hint: Type the keyword that sets the ending value
4. FOR i FROM 1 TO 5 DISPLAY i END FOR
Hint: Type the keywords that close the loop
5. FOR count FROM 1 TO 10
Hint: Type the keyword that starts a loop with a different loop variable name

Spot the Error

Question 1
A FOR i TO 1 FROM 10
B DISPLAY i
C END FOR
Line A — The keywords are in the wrong order — it should read FOR i FROM 1 TO 10.
Question 2
A FOR i FROM 1 TO 10
B PRINT i
C END FOR
Line B — VCAA pseudocode uses DISPLAY to output a value, not PRINT.
Question 3
A FOR i FROM 1 TO 10
B DISPLAY i
C ENDFOR
Line C — The closing keyword should be written as END FOR, not ENDFOR.
Question 4
A FOR i FROM 1 TO n
B total <- total + i
C DISPLAY total
D END IF
Line D — A FOR loop must be closed with END FOR, not END IF.
Question 5
A FOR i FROM 1 TO 5
B DISPLAY i
C i <- i + 1
D END FOR
E NEXT i
Line E — VCAA pseudocode closes a FOR loop with END FOR; NEXT i is not valid syntax.

Student with a class code? Join your class →