Note AcademyNote Academy

Computer Science · May / June 2023 · Paper 21 · Question 4

0478

As printed in the paper

The question as text

Explain the purpose of the library routines DIV and ROUND DIV ROUND [4]

Read automatically from the paper; the printed page above is exact.

Show the answer and mark scheme

One mark per mark point, max four

DIV, max two

To perform integer division
Meaning only the whole number part of the answer is retained
Example of DIV For example DIV(9,4) = 2

ROUND, max two

To return a value rounded to a specified number of digits / decimal places
The result will either be rounded to the next highest or the next lowest value
… depending on whether the value of the preceding digit is >=5 or <5
Example of ROUND for example, ROUND(4.56, 1) = 4.6

Make a free account to save your answers and see your weak topics and ask the AI why a wrong answer is wrong.