Learn to code with step-by-step lessons. A place for students to work through programming fundamentals and build skills.
One possible program:
total = 0.0
while True:
amount = float(input("Enter payment (0 to finish): "))
if amount == 0:
break
total += amount
print("Sum is:", total)