def getWordScore(word):
points_total = 0
for letter in word:
points_total += getLetterScore.get(letter,0)
return points_total
brownie_points = getWordScore("BROWNIE")
output NameError: name 'word' is not defined
I'm a bit confused at why I'm getting the nameError,Any suggestions?
a proper indentation should do the trick
def getWordScore(word):
points_total = 0
for letter in word:
points_total += getLetterScore.get(letter, 0)
return points_total
brownie_points = getWordScore("BROWNIE")
do notice that you have not provided getLetterScore
, so there might be some other issues