num1 = 0 total = 0 count = 0 while num1 != "X" : num1 = input("Enter a number:") count = count + 1 if num1 == "X" : count = count - 1 break num1 = int(num1) total = total + num1 print (total) average = total / count print (average)