Unsupported operand type(s) for +: ‘float’ and ‘str’ error

Since score was created by splitting a string, it’s elements are all strings; hence the complaint about trying to add a float to a string. If you want the value that that string represents, you need to compute that; something like float(score[i]).

Leave a Comment