Scrabble is a game where players get points by spelling words. Words are scored by adding together the point values of each individual letter (we’ll leave out the double and triple letter and word scores for now).
To the right is a dictionary containing all of the letters in the alphabet with their corresponding Scrabble point values.
For example: the word
"Helix" would score
15 points due to the sum of the letters:
4 + 1 + 1 + 1 + 8.
Define a function
scrabble_score that takes a string
word as input and returns the equivalent scrabble score for that word.
- Assume your input is only one word containing no spaces or punctuation.
- As mentioned, no need to worry about score multipliers!
- Your function should work even if the letters you get are uppercase, lowercase, or a mix.
- Assume that you’re only given non-empty strings.