0
Does anyone know how I can change this code for it to also print the average of the numbers that are being inputted by the user?
total=0 count=0 while count<5: total += int(input("Please enter a number")) count +=1 print("The total is", total)
1 Answer
+ 1
total=0
count=0
while count<5:
num = int(input("Please enter a number"))
total += num
count +=1
average = total/5
print("The total is", total)
print("The average number is",average)
#If this is what you were lookig for.
#idk if this works, it should.