Arithmetic operators including DIV and MOD
Arithmetic operators beside + - * /. DIV gives the whole-number quotient (17 DIV 5 = 3). MOD gives the remainder (17 MOD 5 = 2). Number MOD 2 = 0 tests for even. Brackets set the order.
Understanding Arithmetic operators including DIV and MOD in IGCSE Computer Science Paper 2
What it does: An even number has remainder 0 when divided by 2, so Number MOD 2 = 0 is the standard even test. Brackets are worked out first, so Price + Tax is added before the result is multiplied by 3. DIV gives the whole-number quotient: 5 goes into 17 three times. The remainder 2 is what MOD gives. MOD gives the remainder after dividing. 17 = 3 x 5 + 2, so 17 MOD 5 is 2. Multiplication is done before addition: 3 * 4 = 12, then 12 + 2 = 14. Use brackets (2 + 3) * 4 to get 20.
Common mistakes: MOD gives the remainder (2), not the number of full boxes. The whole-number quotient needs DIV: Items DIV BoxSize gives 3. DIV gives the whole-number quotient, so it cannot test for even. Use the remainder: Number MOD 2 = 0.
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 358–368) and word search (Modules 358–378).
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
DIV and MODFill in the Blanks
Spot the Error
Student with a class code? Join your class →