I made this code to add random numbers to an array and print the sums, all of that works except the code engine im using requires me to add "Total is:" to the sum of the random numbers, but i get an error when trying to do this, i did this o many other occasions and this doesnt work for some reason.
the error is :
the error is :
Error:Traceback (most recent call last):
File "question2.py", line 13, in <module>
test()
File "question2.py", line 9, in test
print ("Total:" + stuff)
TypeError: must be str, not int
def test(): import random stuff = 0 num = int(input("How many values to add to the array: ")) for x in range(num): array.append(random.randint(10,99)) stuff = sum(array) print (array) print ("Total:" + stuff)