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 | |
|---|---|---|
| 1DIV(10, 3) | ADIV gives the quotient, not the remainder, so it cannot test for even. The test should use MOD(Number, 2) = 0. | |
| 2MOD(10, 3) | BHours ← DIV(TotalMinutes, 60) | |
| 3Test whether the variable Number holds an even number | CDIV gives the whole hours, not the minutes left over. The leftover minutes need MOD(TotalMinutes, 60). | |
| 4Convert TotalMinutes into whole hours (for example 135 minutes gives 2 hours) | DGives the remainder when 10 is divided by 3, which is 1 | |
| 5Minutes ← DIV(TotalMinutes, 60) | EGives the whole-number part of 10 divided by 3, which is 3 | |
| 6IF DIV(Number, 2) = 0 THEN | FIF MOD(Number, 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(a, b) and MOD(a, b) — DIV(a, b) gives the whole-number part of a divided by b, so DIV(10, 3) is 3. MOD(a, b) gives the remainder, so MOD(10, 3) is 1. Both take integers.OUTPUT DIV(10, 3)OUTPUT MOD(10, 3)IF MOD(Number, 2) = 0 THEN
OUTPUT "Even"
ENDIFMinutes ← 135
Hours ← DIV(Minutes, 60)
OUTPUT HoursHours ← DIV(Minutes, 60)
Left ← MOD(Minutes, 60)
OUTPUT Left