You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement the funciton in src/wordValue.py with the following specification:
given a dict of letter to numeric value mappings, calculate the value of the given word
example valueDict = {'o': 3, 's': 7} word = 'os'
return 3+7 = 10
The text was updated successfully, but these errors were encountered:
valueDict = {'o':3, 's':7} word = [] for key in valueDict.keys(): word.append(key) result = [] for letter in word: result.append(valueDict[letter]) total = sum(result)
???
Implement the funciton in
src/wordValue.py
with the following specification:The text was updated successfully, but these errors were encountered: