Cambridge O Level Computer Science 2210 · 8.1 Programming concepts

Q35 · 2210/21/M/J/25 Q5

Worked solution from the Programming Paper 2 Algorithms, Programming and Logic booklet, Part 1 of 3.

Q352210/21/M/J/25original Q5Structured · 4 marks
Question 5 from 2210/21/M/J/25

Worked solution

MOD and DIV

MOD: gives the remainder of a division [1]

Example: X ← MOD(10, 3) [1]

DIV: gives the whole-number part (quotient) of a division [1]

Example: Y ← DIV(10, 3) [1]

KEY IDEAMOD gives the remainder; DIV gives the whole-number answer.
TOTAL 4 marks

Official mark scheme

Mark scheme for 2210/21/M/J/25 question 5
VIDEO
▶ Topic lesson

A lesson on this topic · by Mr Bulmer's Learning Zone. Tap the picture to open it on YouTube.

Solutions follow the official Cambridge mark schemes; marks are shown in grey. Videos are from other YouTube channels. Paper codes read component / series / year: M/J = May/June, O/N = October/November. Past-paper questions © UCLES, reproduced for classroom practice.