Functions calling other functions
A function can call another function inside its body. Here square() is a helper, so the bigger function stays short and each function does one job.
Understanding Functions calling other functions in ACARA Digital Technologies Years 9–10
What it does: area() calls the helper multiply() inside its body instead of doing everything itself. Every step has one function, and main() runs them in the right order to build the whole program. Functions can call other functions. This is how we build a bigger function from small helpers. Calling square() keeps the bigger function short and lets the helper do one job. Repeating the maths everywhere goes against that idea. Each box in a decomposition becomes its own single-job function. That makes each part easier to test. The steps must run in a sensible order: load the data first, then process it, then show the result. Showing before loading gives wrong output.
Common mistakes: A function is called with round brackets, not square brackets. It should be sq(a), so the helper runs and gives back the square of a. The helper getArea must multiply width by height. Adding them gives the wrong answer for showArea. It should be return w * h;.
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 681–707) and word search (Modules 629–707).
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
return square(a) + square(b);Fill in the Blanks
Spot the Error
Student with a class code? Join your class →