Scrabble score
Intro
Letter Values
You'll need these:
1 2 3 4 5 6 7 8 |
|
Examples
"cabbage" should be scored as worth 14 points:
- 3 points for C
- 1 point for A, twice
- 3 points for B, twice
- 2 points for G
- 1 point for E
And to total:
3 + 2*1 + 2*3 + 2 + 1
- =
3 + 2 + 6 + 3
- =
5 + 9
- = 14
Task
Given a word, compute the Scrabble score for that word.
The Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
|
1 2 3 4 5 6 7 8 |
|
Last update: February 13, 2021