← Back to challenges

Scrabble Scores (Part 1)

PythonHardgamessorting

Instructions

Create a function that takes a list of words, scores the words based on the Scrabble scoring table below, and returns a list of the highest scoring words. The words on resulting list should be in the same relative order as the original list.

LetterPoints
A1
B3
C3
D2
E1
F4
G2
H4
I1
J8
K5
L2
M3
N1
O1
P3
Q10
R1
S1
T1
U1
V4
W4
X8
Y4
Z10

Examples

best_words(["got", "test", "oh", "sat", "rents"]) ➞ ["oh", "rents"]

best_words(["digest", "divest", "verge", "honey", "money"]) ➞ ["honey"]

best_words(["berry", "whiz", "laughed", "ghetto", "psychic"]) ➞ ["whiz", "psychic"]

Notes

Input and output should both be lists (see tests).

python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.