← ACARA Digital Technologies Years 7–8

Pseudocode layout: capital keywords and indentation

Write keywords like IF, THEN, ELSE and REPEAT in capitals, one step per line, and indent the steps inside each structure so ELSE lines up with its IF.

Understanding Pseudocode layout: capital keywords and indentation in ACARA Digital Technologies Years 7–8

What it does: Each step has its own line and the keywords SET, TO, INPUT and OUTPUT are capitals, which makes the algorithm easy to read and follow. The IF is inside the REPEAT so it is indented one level, and the OUTPUT is inside the IF so it is indented a further level. Pseudocode keywords such as IF and THEN are written in capital letters so they stand out from variable names. Indenting the steps inside a structure shows which steps belong to it. ELSE lines up with its IF so you can see the two belong together as one decision. The step being repeated is indented so it is clear that it sits inside the loop.

Common mistakes: Pseudocode keywords must be written in capitals. IF and THEN should be written as: IF age >= 13 THEN. Keywords must be all capitals, not just start with a capital letter. It should be: IF mark >= 50 THEN.

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 365–411) and word search (Modules 331–411).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
Which line is written in the correct pseudocode style?
IF score > 10 THENif score > 10 then
Matches
if age >= 13 then output "Teen"
↓
The keywords if, then and output are in lowercase. They should be written in capitals: IF, THEN and OUTPUT.
Applying
Meanings
Term
pseudocode layout
Meaning
Write keywords like IF, THEN, ELSE and REPEAT in capitals, one step per line, and indent the steps inside each structure so ELSE lines up with its IF.
Practice
SET score TO 0
Testing
Gaps
Check Answer
Spots
1SET age TO 12
2if age >= 13 then

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. Which line is written in the correct pseudocode style?
A. IF score > 10 THEN ✓
B. if score > 10 then
Pseudocode keywords such as IF and THEN are written in capital letters so they stand out from variable names.
2. How should the steps inside an IF block be laid out?
A. Lined up with the IF at the left edge
B. Indented under the IF line ✓
Indenting the steps inside a structure shows which steps belong to it.
3. Where should ELSE be placed?
A. Lined up directly under its matching IF ✓
B. Indented further than the steps above it
ELSE lines up with its IF so you can see the two belong together as one decision.
4. Which layout follows the one step per line rule?
A. SET total TO 0 SET count TO 1 ✓
B. SET total TO 0 SET count TO 1
Each step gets its own line, which makes the algorithm easy to read and to trace.
5. Which REPEAT block is laid out correctly?
A. REPEAT 3 TIMES OUTPUT "Hi"
B. REPEAT 3 TIMES OUTPUT "Hi" ✓
The step being repeated is indented so it is clear that it sits inside the loop.

Match the Pairs

IF score > 10 THEN OUTPUT "Pass" ELSE OUTPUT "Try again" → ELSE lines up with its IF, and the steps inside each part are indented
REPEAT 3 TIMES OUTPUT "Hello" → The indented step is repeated; the keywords are in capitals
Write one step per line, with keywords in capitals → SET total TO 0 INPUT age OUTPUT age
Indent a nested block further than the block around it → REPEAT 5 TIMES IF key = "Q" THEN OUTPUT "Quit"
if age >= 13 then output "Teen" → The keywords if, then and output are in lowercase. They should be written in capitals: IF, THEN and OUTPUT.
IF score > 10 THEN OUTPUT "Pass" ELSE OUTPUT "Try again" → ELSE is indented in line with the steps instead of lining up with its IF. It should start in the same column as IF.

Key Term

pseudocode layout
Write keywords like IF, THEN, ELSE and REPEAT in capitals, one step per line, and indent the steps inside each structure so ELSE lines up with its IF.

Fill in the Blanks

1. IF score >= 50 THEN OUTPUT "Pass" ELSE
Hint: Type the capital keyword that starts the other path and lines up with IF.
2. REPEAT 3 TIMES OUTPUT "Hi" END REPEAT
Hint: Type the capital keyword that begins a loop.
3. IF age >= 13 THEN OUTPUT "Teen" END IF
Hint: Type the capital keyword that comes after the condition and before the indented step.
4. IF raining THEN OUTPUT "Take umbrella" END IF
Hint: Type the closing keywords that finish the decision, lined up with IF and written in capitals.
5. REPEAT count ← count + 1 UNTIL count = 5
Hint: Type the capital keyword that ends the loop and introduces the stopping condition.

Spot the Error

Question 1
A SET age TO 12
B if age >= 13 then
C DISPLAY "Teen"
D ELSE
E DISPLAY "Child"
Line B — Pseudocode keywords must be written in capitals. IF and THEN should be written as: IF age >= 13 THEN.
Question 2
A INPUT mark
B If mark >= 50 Then
C DISPLAY "Pass"
D ELSE
E DISPLAY "Try again"
Line B — Keywords must be all capitals, not just start with a capital letter. It should be: IF mark >= 50 THEN.
Question 3
A SET total TO 0
B REPEAT 5 times
C ADD 2 TO total
D DISPLAY total
Line B — TIMES is a keyword, so it must be in capitals like REPEAT. The line should be: REPEAT 5 TIMES.
Question 4
A SET lives TO 3
B REPEAT UNTIL lives = 0
C display lives
D SUBTRACT 1 FROM lives
Line C — DISPLAY is a keyword, so it must be in capitals even when it is indented inside the loop. It should be: ' DISPLAY lives'.
Question 5
A INPUT name
B SET score TO 0
C DISPLAY name DISPLAY score
D DISPLAY score
Line C — Pseudocode has one step per line. The two DISPLAY steps must be split onto separate lines.

Student with a class code? Join your class →