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 | |
|---|---|---|
| 1CAB = 3 1 2 | AEncoding the word CAB by swapping each letter for its number when A=1, B=2 and C=3 | |
| 22 1 3 = BAC | BBAD = 2 1 4 | |
| 3Encoding a name: swap each letter for its number, using A=1, B=2, C=3, D=4 and so on | CThe numbers were put in order instead of being decoded one by one. 2 is B, 1 is A and 3 is C, so the word is BAC. | |
| 4Checking by decoding: turn the numbers back into letters to see if you get the original word | DThe numbers are in the wrong order. A should be 1 and B should be 2, so CAB is 3 1 2, not 3 2 1. | |
| 5CAB = 3 2 1 | EDecoding the numbers 2 1 3 by swapping each number back for its letter when A=1, B=2 and C=3 | |
| 6A=1, B=2, C=3: 2 1 3 decodes to ABC | F3 1 2 = CAB, so the code is right |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
encode — To encode a word, swap each letter for its number in the code, so with A=1, B=2 and C=3, CAB becomes 3 1 2. To decode it, swap each number back for its letter.Key: A=1 B=2 C=3 D=4 E=5
encode("BAD") = 2 1 4Key: A=1 B=2 C=3 D=4 E=5
decode(3 1 4 5) = C A D EKey: A=1 B=2 C=3 D=4 E=5 space=0
encode("A BE") = 1 0 2 5Key: A=1 B=2 C=3 D=4 E=5
encode("CAB") = 3 1 2Key: A=1 B=2 C=3 D=4 E=5
encode("ACE") = 1 3 5
decode(1 3 5) = "ACE"