← VCE Pseudocode

return keyword

A keyword that sends a value back from a function to where it was called, ending the function's execution at that point

Understanding return keyword in VCE Pseudocode

What it does: This description matches return, which sends a value back and stops the function. This line assigns the value returned by addNumbers to the variable output. Once return runs, the function ends immediately, so any code after it does not execute. The keyword is written in lowercase as return, not RETURN. return should not use parentheses; the value follows it directly, such as return x. A function can include several return statements, such as one inside an IF branch and one inside an ELSE branch. return can be used with an expression, calculating and sending back the result in one step.

Common mistakes: The keyword to send a value back from a function is return, not give. The keyword should be written in lowercase as return, not RETURN.

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 return send a value back from a function to where it was called?
TrueFalse
Matches
define isEven(num) IF num MOD 2 = 0 THEN RETURN TRUE END IF end function
↓
The keyword should be written in lowercase as return, not RETURN
Applying
Meanings
Term
return
Meaning
A keyword that sends a value back from a function to where it was called, ending the function's execution at that point
Practice
define addNumbers(a, b)
Testing
Gaps
result
Check Answer
Spots
2 result ← a + b
3 give result

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

The 'Manta Ray' badge — Graceful Coder, 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 return send a value back from a function to where it was called?
A. False
B. True ✓
return is the keyword used to send a result back from a function to the calling code.
2. Does code after a return statement inside a function still run?
A. False ✓
B. True
Once return runs, the function ends immediately, so any code after it does not execute.
3. Should the return keyword be followed by the value being sent back?
A. True ✓
B. False
return is followed directly by the value or expression to send back, such as return total.
4. Can a returned value be stored in a variable when the function is called?
A. True ✓
B. False
The value sent back by return can be assigned to a variable, such as result ← myFunction(x).
5. Is RETURN written in uppercase in VCAA pseudocode?
A. True
B. False ✓
The keyword is written in lowercase as return, not RETURN.

Match the Pairs

return result → Sends the value stored in result back from the function
return num * num → Calculates a value and sends it back immediately
A keyword that sends a value back and ends a function's execution → return
Storing the value sent back by a function in a variable → output ← addNumbers(3, 4)
define isEven(num) IF num MOD 2 = 0 THEN RETURN TRUE END IF end function → The keyword should be written in lowercase as return, not RETURN
define getMax(a, b) IF a > b THEN return a ELSE return(b) END IF end function → return should not use parentheses around its value

Key Term

return
A keyword that sends a value back from a function to where it was called, ending the function's execution at that point

Fill in the Blanks

1. return result
Hint: Type the keyword that sends a value back from a function
2. define square(num) return num * num end function
Hint: Type the keyword that sends the calculated value back
3. define isPositive(num) IF num > 0 THEN return TRUE END IF end function
Hint: Type the keyword that sends TRUE back from the function
4. define multiply(x, y) return x * y end function
Hint: Type the keyword that ends the function and sends back the result
5. output ← addNumbers(3, 4) // this stores the returned value
Hint: Type the symbol used to start a comment in pseudocode

Spot the Error

Question 1
A define addNumbers(a, b)
B result ← a + b
C give result
D end function
Line C — The keyword to send a value back from a function is return, not give.
Question 2
A define isEven(num)
B IF num MOD 2 = 0 THEN
C RETURN TRUE
D END IF
E end function
Line C — The keyword should be written in lowercase as return, not RETURN.
Question 3
A define multiply(x, y)
B return x * y
C end function
D output ← multiply(2, 3)
Line D — There is no incorrect line here — all lines follow correct return keyword syntax.
Question 4
A define getMax(a, b)
B IF a > b THEN
C return a
D ELSE
E return(b)
F END IF
Line E — return should not use parentheses around its value; it should be written as return b.
Question 5
A define greet(name)
B return "Hello, " + name
C end function
D message ← greet("Sam")
Line D — There is no incorrect line here — all lines follow correct return keyword syntax.

Student with a class code? Join your class →