2210/21/M/J/23 question 4: worked solution (May/June 2023, paper 21)

Show as plain text

Cambridge O Level Computer Science 2210 · 8.1 Programming concepts Worked solution from the Programming Paper 2 Algorithms, Programming and Logic booklet, Part 1 of 3. Q16 2210/21/M/J/23 original Q4 Structured · 4 marks Worked solution DIV DIV does integer division. [1] Only the whole-number part of the answer is kept, so the remainder is thrown away. [1] Example: DIV(9, 4) = 2 ROUND ROUND gives a number rounded to a stated number of decimal places. [1] It goes up or down depending on the next digit: 5 or more rounds up, less than 5 rounds down. [1] Example: ROUND(4.56, 1) = 4.6 KEY IDEA DIV keeps the whole number of a division; ROUND shortens a number to a set number of decimal places. TOTAL 4 marks Official mark scheme VIDEO ▶ Whole paper Video solution of the whole paper · by ZAINEMATICS. Tap the picture to open it on YouTube.