Scrabble_score Error


Oops, try again.
Does your scrabble_score function take exactly one argument (a
string)? Your code threw a "'int' object has no attribute 'getitem'"

I can't see why I'm getting this error? Any help is very much appreciated.

entry = raw_input("What is your word? ")

def scrabble_score(word):
    word = word.lower()
    score = 0
    for letter in word:
        score += score[letter]
    return score
print scrabble_score(entry)


Sorry guys I got it. My total score variable name 'score' was the same as the dictionary.


score = 0

this not have means. int not have index.

and i think you change the code, click on reset code and then try again.