ROUND: rounding to decimal places
Library routine that returns value rounded to the given number of decimal places. ROUND(3.14159, 2) gives 3.14. If places is 0, the result is a whole number.
Understanding ROUND: rounding to decimal places in IGCSE Computer Science Paper 2
What it does: Price is an identifier that holds a REAL value, and ROUND rounds that value to 1 decimal place. Total / 3 is calculated first, then the result is rounded to 2 decimal places and output. The 2 means 2 decimal places. The next digit is 1, so 3.14159 rounds down to 3.14. The second argument is the number of decimal places. ROUND(7.8261, 3) returns 7.826. Places of 0 gives a whole number. 8.67 rounds up to 9. The third decimal digit is 1, so the second decimal place stays the same. The result is 4.56. ROUND(value, places) always takes two arguments, so leaving out places is an error.
Common mistakes: The arguments of ROUND must be separated by a comma, not a semicolon. It should be ROUND(3.14159, 2). ROUND needs two arguments: the value and the number of decimal places. It should be ROUND(Mark, 2).
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 429–438) and word search (Modules 419–438).
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
ROUND(value, places)Fill in the Blanks
Spot the Error
Student with a class code? Join your class →