9/15 Scrabble Score


#1

Can somebody please tell me why the following code keeps giving me this error ‘Does your scrabble_score function take exactly one argument (a string)? Your code threw a “cannot concatenate ‘str’ and ‘int’ objects” error.’? My code below :

def scrabble_score(word):
  total = ''
  for char in word:
    total += score[char]
  return total

#2

You have initialized total as type str when it should be a number, 0. We cannot concatenate a number to a string.


#3

Thank you! Super helpful :blush: