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 | |
|---|---|---|
| 1(23 + 3) mod 26 = 0 | A25 + 1 = 26, then 26 - 26 = 0 | |
| 2(25 + 2) mod 26 = 1 | BZ is number 25. Shifting it by 2 wraps around to 1, which is the letter B. | |
| 3The alphabet is a circle of 26 letters numbered 0 to 25, so the number after 25 goes back to 0 | CX is number 23. Shifting it by 3 reaches 26, which wraps back to 0, the letter A. | |
| 4To count past Z, subtract 26 whenever the total is bigger than 25 | Dif total > 25: total = total - 26 | |
| 5X (23) shifted by 3 = 26, so the letter is 26 | EThere is no letter 26. The numbers only go from 0 to 25, so 26 must wrap around to 0, which is A. | |
| 6Z (25) + 2 = 27, then 27 - 26 = 2, so the letter is C | FThe sum is wrong. 27 - 26 is 1, not 2, and letter 1 is B, so Z shifted by 2 is B. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
wrap around — When a shift goes past Z, the count carries on from A, so X shifted by 3 becomes A. The alphabet works like a circle of 26 letters, numbered 0 to 25.newPos ← (pos + shift) MOD 26newPos ← (pos + shift) MOD 26A ← 0
Z ← 25IF pos > 25 THEN
pos ← pos - 26
END IF(23 + 3) MOD 26 gives 0, which is A