Stubs: placeholder code and comments for future development
A Python statement that does nothing. It fills a stub's empty body, often beside a # TODO comment, so the program still runs while the real code is written later.
Understanding Stubs: placeholder code and comments for future development in VCE Software Development U3O1
What it does: The stub returns a fixed value, 100, so code that calls get_total() still works and can be tested. The TODO shows it needs replacing. A stub is a placeholder. It lets you test other parts of the program before the real code exists. It does not improve speed. pass is a statement that does nothing. It only fills the empty body so Python does not raise a syntax error. A function header must end with a colon. The stub is still just a def line, an indented pass and a comment.
Common mistakes: The stub show_menu() has no parameters, so passing 1 causes a TypeError. The call should be show_menu() with empty brackets. Python comments start with #, not //. The TODO comment should be '# TODO: write to file'.
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 48–71) and word search (Modules 10–71).
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
passFill in the Blanks
Spot the Error
Student with a class code? Join your class →