Built-in functions sum(), min() and max()
Built-in functions that return the total, smallest and largest value in a list, replacing a hand-written loop with one short, clear line of code.
Understanding Built-in functions sum(), min() and max() in VCE Software Development U4O1
What it does: max(list) returns the biggest value in the list, so no loop or comparison variable is needed. sum(scores) gives the total and len(scores) gives how many values there are, so dividing them gives the average in one line. sum() is the built-in function that adds up every value in a list. Python has no built-in called add() for this. Passing separate numbers causes a TypeError because sum() expects one iterable such as a list, so the values must be wrapped in square brackets.
Common mistakes: Python is case-sensitive, so Sum is not the built-in function. It should be sum(marks) in lowercase. The list opens with [ but closes with ), which is a syntax error. It should close with ].
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 82–114) 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
sum(), min(), max()Fill in the Blanks
Spot the Error
Student with a class code? Join your class →