← VCE Pseudocode

define: defining a function

A keyword that starts a function definition, naming the function and listing the parameters it accepts

Understanding define: defining a function in VCE Pseudocode

What it does: This description matches define, the keyword used to begin a function definition. This bracketed list represents the parameters a function accepts. end function marks the end of a function's definition in VCAA pseudocode. The keyword is written in lowercase as define, not DEFINE. Multiple parameters are listed inside the brackets, separated by commas, such as add(a, b). The instructions the function performs are written between its define line and its closing end function. A function definition must close with end function, in that exact order.

Common mistakes: A function definition must close with end function, not end func. The keyword should be written in lowercase as define, not DEFINE.

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 define start a function definition?
TrueFalse
Matches
DEFINE greetUser(name) DISPLAY "Hello " + name end function
↓
The keyword should be written in lowercase as define, not DEFINE
Applying
Meanings
Term
define
Meaning
A keyword that starts a function definition, naming the function and listing the parameters it accepts
Practice
define addNumbers(a, b)
Testing
Gaps
addNumbers(a, b)
Check Answer
Spots
3 DISPLAY result
4end func

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

The 'Elephant' badge — OOP Heavyweight, 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 define start a function definition?
A. True ✓
B. False
define is the keyword used to start naming and defining a new function.
2. Are parameters listed inside brackets after the function name?
A. True ✓
B. False
The parameters a function accepts are listed in brackets right after its name.
3. Should a function definition close with end function?
A. No
B. Yes ✓
end function marks the end of a function's definition in VCAA pseudocode.
4. Is DEFINE written in uppercase in VCAA pseudocode?
A. True
B. False ✓
The keyword is written in lowercase as define, not DEFINE.
5. Can multiple parameters be separated by commas inside the brackets?
A. True ✓
B. False
Multiple parameters are listed inside the brackets, separated by commas, such as add(a, b).

Match the Pairs

define addNumbers(a, b) → Starts a function named addNumbers with two parameters
end function → Closes a function definition
A keyword that starts a function's definition and names it → define
Values listed in brackets after the function name that the function accepts → (a, b)
DEFINE greetUser(name) DISPLAY "Hello " + name end function → The keyword should be written in lowercase as define, not DEFINE
define subtract(a, b) result ← a - b DISPLAY result func end → The closing keywords should be written as end function, not func end

Key Term

define
A keyword that starts a function definition, naming the function and listing the parameters it accepts

Fill in the Blanks

1. define addNumbers(a, b)
Hint: Type the keyword that starts a function definition
2. define addNumbers(a, b) result ← a + b DISPLAY result end function
Hint: Type the keyword that closes a function definition, before the word function
3. define greetUser(name) DISPLAY "Hello " + name end function
Hint: Type the word that follows end to close a function definition
4. define multiply(x, y) result ← x * y DISPLAY result end function
Hint: Type the variable name used to store the multiplication result
5. define square(num) DISPLAY num * num end function
Hint: Type the parameter name used inside the function

Spot the Error

Question 1
A define addNumbers(a, b)
B result ← a + b
C DISPLAY result
D end func
Line D — A function definition must close with end function, not end func.
Question 2
A DEFINE greetUser(name)
B DISPLAY "Hello " + name
C end function
Line A — The keyword should be written in lowercase as define, not DEFINE.
Question 3
A define multiply(x, y)
B result = x * y
C DISPLAY result
D end function
Line B — Assignment in pseudocode uses ←, not =.
Question 4
A define square(num)
B PRINT num * num
C end function
Line B — VCAA pseudocode uses DISPLAY to output a value, not PRINT.
Question 5
A define subtract(a, b)
B result ← a - b
C DISPLAY result
D func end
Line D — The closing keywords must be written as end function, not func end.

Student with a class code? Join your class →