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:
donation = float(input("Donation amount (0 to finish): "))
if donation == 0:
break
total += donation
print("Total raised:", total)