"""File: running_sum.py Purpose: Add a collection of user input numbers Run: python running_sum.py Input: A sequence of numbers, one per line of input, 0 terminates input Output: The sum of the numbers """ sum = 0.0 number = float(raw_input("Enter the first number (0 to quit)\n")) while number != 0: sum = sum + number number = float(raw_input("Enter the next number (0 to quit)\n")) print "The sum of the input values is", sum