Procedures versus functions
A procedure carries out a task without returning a value, while a function returns a value to the code that called it, so the result can be stored or used.
Understanding Procedures versus functions in VCE Software Development U4O1
What it does: The call add(2, 3) gives back a value, which is stored in total. This only works with a function that returns a value. A procedure does not return a value, so it is simply called on its own line to carry out its task. Having a parameter does not make something a function. show_welcome only prints, so it is a procedure. If the result must be used later, return it from a function. Printing only shows it on screen. A function's returned value is lost unless the caller stores it in a variable or uses it, for example by printing it.
Common mistakes: say_hi is a procedure that should print its message. With return, the text goes back to the caller, which does nothing with it, so nothing is shown. It should be print("Hi, " + name). A function must send its answer back to the caller. A bare return gives back None, so print() would show None instead of 12. It should be return result.
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 3–79) and word search (Modules 3–114).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
procedure vs functionFill in the Blanks
Spot the Error
Student with a class code? Join your class →