Average: how it works
The average is the total of the values divided by how many values there are. It needs both a total and a count, can be a REAL, and is not allowed when the count is zero.
Understanding Average: how it works in IGCSE Computer Science Paper 2
What it does: The loop builds up a Total and a Count together. Both are needed before the average can be found. The average is the total of the values divided by how many values there are. The total is 15 and the count is 3. 15 / 3 = 5. Fifteen is only the total. An average can have a decimal part, for example 7 / 2 = 3.5, so REAL is the safe choice. Only divide when Count is greater than 0. The wrong option divides exactly when Count is zero.
Common mistakes: The average is the total divided by the count, not the other way round. It should be Average ← Total / Count. An average often has decimal places, so it can be a REAL. Declaring it as INTEGER is wrong. It should be DECLARE Average : REAL.
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 286–295) and word search (Modules 275–295).
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
Average ← Total / CountFill in the Blanks
Spot the Error
Student with a class code? Join your class →