I keep getting the error – TypeError: unsupported operand type(s) for +: ‘int’ and ‘str’
temp = [] temp1 = input(int()) temp.append(temp1) average = sum(temp)/len(temp) print(average)
I have excluded most of the input code as it is long and not optimized.
Advertisement
Answer
it might be int(input())
not input(int())
instead. :D
because int() is 0, but input() argument is a string not int, so that the error occurs