Problem 56. Scrabble Scores
Given a word, determine its score in Scrabble.
The input string will always be provided in lower case. Use the English language Scrabble letter values as found in this Wikipedia reference: letter distributions for English.
Example:
Input str = 'matlab' Output score is 10.
Solution Stats
Problem Comments
-
2 Comments
Why don't you provide the counting system inside the function? What's the point of retyping it from wiki?
@Jonas
I agree
case {'l','s','u','n','r','t','o','a','i','e'}
score=1
case {'g','d'}
score=2
case {'b','c','m','p'}
score=3
case {'f','h','v','w','y'}
score=4
case {'k'}
score=5
case {'j','x'}
score=8
case {'q','z'}
score=10
Solution Comments
Show commentsProblem Recent Solvers1980
Suggested Problems
-
4008 Solvers
-
Find all elements less than 0 or greater than 10 and replace them with NaN
15387 Solvers
-
Program an exclusive OR operation with logical operators
705 Solvers
-
Cell Counting: How Many Draws?
1728 Solvers
-
Create an n-by-n null matrix and fill with ones certain positions
555 Solvers
More from this Author96
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!