Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Simple solution in Clear category for Worth of Words by mindaugas.dadurkevicius
VALUES = {'e': 1, 'a': 1, 'i': 1, 'o': 1, 'n': 1, 'r': 1,
't': 1, 'l': 1, 's': 1, 'u': 1, 'd': 2, 'g': 2,
'b': 3, 'c': 3, 'm': 3, 'p': 3, 'f': 4, 'h': 4,
'v': 4, 'w': 4, 'y': 4, 'k': 5, 'j': 8, 'x': 8,
'q': 10, 'z': 10}
def worth_of_words(words):
maxworth = 0
for i in range(len(words)):
worth = 0
for i2 in range(len(words[i])):
worth += VALUES[words[i][i2]]
if worth > maxworth:
maxworth = worth
word = words[i]
return word
July 24, 2018