question 1
Which slot does the method give the word set?
the answer, and why
the answer is D
s is 19: 0 times 31 plus 19 is 19, which leaves 6. Then 6 times 31 plus 5 is 191, which leaves 9. Then 9 times 31 plus 20 is 299, which leaves 0.
if you chose another
- That adds the letters, 44, and keeps the remainder. The method multiplies by 31 before each letter.
- That is the remainder of t's 20 after dividing by 13, the last letter alone. Multiplying by 31 keeps every letter in the value.
- That reads the letters from the last, t first, as tes. The method starts at the first letter.