Write a program that repeatedly asks a user to enter a number. The program will sum up all the number that the user keyed in. Terminate the program when the user enters -9, and display the sum of all the numbers entered by the user (exclude -9).
1
Expert's answer
2011-06-29T11:10:51-0400
sum = 0
while True:
number = float(input ("Enter a number: "))
Comments
Leave a comment