question 1
Which slot does the method give the word war?
the answer, and why
the answer is C
w is 23: 0 times 31 plus 23 is 23, which leaves 10. Then 10 times 31 plus 1 is 311, which leaves 12. Then 12 times 31 plus 18 is 390, which leaves 0.
if you chose another
- That adds the letters, 42, and keeps the remainder. The method multiplies by 31 before each letter.
- That is the remainder of r's 18 after dividing by 13, the last letter alone. Multiplying by 31 keeps every letter in the value.
- That reads the letters from the last, r first, as raw. The method starts at the first letter.