Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 117 DIV 5 | AGives the remainder after dividing, which is 2 | |
| 217 MOD 5 | BGives the whole-number quotient, which is 3 | |
| 3Test whether a number is even by checking that dividing by 2 leaves no remainder | CDivision is worked out before addition, so only B is halved. Brackets are needed: (A + B) / 2. | |
| 4Use brackets so the addition is worked out before the multiplication | DDIV gives the whole-number quotient, not the remainder. To test for even, use MOD 2 = 0. | |
| 5IF Number DIV 2 = 0 THEN | ETotal <- (Price + Tax) * 3 | |
| 6Average <- A + B / 2 | FIF Number MOD 2 = 0 THEN |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
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.OUTPUT 17 DIV 5Remainder ← 17 MOD 5IF Number MOD 2 = 0 THEN
OUTPUT "Even"
ENDIFAverage ← (Mark1 + Mark2) / 2Minutes ← Total DIV 60
Seconds ← Total MOD 60