Difference between a procedure and a function
Only a function has RETURNS: it gives back a value used where it is called. A procedure returns nothing and is run on its own with CALL.
Understanding Difference between a procedure and a function in IGCSE Computer Science Paper 2
What it does: The call Total(3, 4) is replaced by the value it returns, so that value can be stored in Cost. A function returns a value to the place where it was called. A procedure does not return anything. A procedure is run as its own statement using CALL. It has no value to store in a variable. A function call is used inside an expression, such as an assignment. CALL is only for procedures.
Common mistakes: A function must give its value back to the place it was called, so it needs RETURN Result. OUTPUT only displays the value and returns nothing. A procedure starts with PROCEDURE, so it must finish with ENDPROCEDURE. ENDFUNCTION is only used to close a function.
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 399–408) 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
RETURNSFill in the Blanks
Spot the Error
Student with a class code? Join your class →