I keep getting the error – TypeError: unsupported operand type(s) for +: ‘int’ and ‘str’
JavaScript
x
7
1
temp = []
2
temp1 = input(int())
3
temp.append(temp1)
4
5
average = sum(temp)/len(temp)
6
print(average)
7
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