ERROR(After giving input, no syntax errors before that):
Traceback (most recent call last):
File “python”, line 15, in
File “python”, line 11, in scrabble_score
KeyError: (0, u’a’)
Code to return the scrabble score successfully.
My code: def scrabble_score(word): word = word.lower() word_score = 0 for item in enumerate(word): word_score += score[item] return word_score word = raw_input("Enter your word: ") print "Your score is: " + str(scrabble_score(word))
Can anyone figure out where I am going wrong?