Using a function call in OUTPUT
Puts a function call inside OUTPUT. The function runs first, then the value it RETURNs is displayed. Text can be added: OUTPUT "Sum = ", SumSquare(10, 20).
Understanding Using a function call in OUTPUT in IGCSE Computer Science Paper 2
What it does: The call SumSquare(a, b) is used as the value to display, with no variable needed in between. The returned value is saved in Total first. OUTPUT then displays the variable, which holds the function's value. Items in an OUTPUT statement are separated by commas. Without the comma the statement is not valid.
Common mistakes: The function call is missing its closing bracket. It should be OUTPUT "Sum = ", Add(10, 20). CALL is only used for procedures. A function is called by writing its name and arguments, so it should be Total ← SumSquare(10, 20).
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 409–418) and word search (Modules 399–418).
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
OUTPUT SumSquare(10, 20)Fill in the Blanks
Spot the Error
Student with a class code? Join your class →