Functions calling other functions
A function that calls other small functions, each doing one job, so the program is built in parts. Each box in a hierarchy chart can become one function.
Understanding Functions calling other functions in VCE Software Development U4O1
What it does: A box in a hierarchy chart named Draw board turns into one function named draw_board that does just that job. main() holds the calls to the smaller functions, and calling main() at the bottom starts the program. Each function should do one job. get_total() only adds up prices, so it is easy to test and reuse. If a name needs 'and' to describe it, the function is probably doing more than one job. Split it into smaller functions. Code can call a function and use its returned value, so each function handles a single small task. To call a function you need brackets after its name, like greet() and show_score().
Common mistakes: The closing bracket of input() is missing. The line should be return input('Name: ') so the function gives back what the user typed. double() works out n * 2 but never returns it, so it gives back None. The line should be return n * 2 so show() can use the 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
def main():Fill in the Blanks
Spot the Error
Student with a class code? Join your class →