Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/wordValue.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@
#example valueDict = {'o': 3, 's': 7} word = 'os'
#return 3+7 = 10
def word_value(valueDict, word):
pass
wordlist=[x for x in word if word!=' ']
sum=0
for k in [valueDict[j] for i in wordlist for j in valueDict.keys() if i==j]: sum+=k
return sum