Professional Documents
Culture Documents
A 3
A 3
0
1
2
3
points
point per character for all characters in word
points per character for all characters in word
points per character for all characters in word
>>> word_score('DRUDGERY')
16
"""
total = 0
if len(word) < 3:
return total
elif len(word) >= 3 and
for char in word:
total = total +
elif len(word) >= 7 and
for char in word:
total = total +
elif len(word) >= 10:
for char in word:
total = total +
len(word) <= 6:
1
len(word) <= 9:
2
3
return total
def update_score(player_info, word):
""" ([str, int] list, str) -> NoneType
player_info is a list with the player's name and score. Update player_info
by adding the point value word earns to the player's score.
>>> update_score(['Jonathan', 4], 'ANT')
"""
player_info[1] = player_info[1] + word_score(word)
def num_words_on_board(board, words):