# Name:
# Date:

# proj02: sum

# Write a program that prompts the user to enter numbers, one per line,
# ending with a line containing 0, and keep a running sum of the numbers.
# Only print out the sum after all the numbers are entered
# (at least in your final version). Each time you read in a number,
# you can immediately use it for your sum,
# and then be done with the number just entered.

#Example:
# Enter a number to sum, or 0 to indicate you are finished: 4
# Enter a number to sum, or 0 to indicate you are finished: 5
# Enter a number to sum, or 0 to indicate you are finished: 2
# Enter a number to sum, or 0 to indicate you are finished: 10
# Enter a number to sum, or 0 to indicate you are finished: 0
#The sum of your numbers is: 21

# counter = 0

#key word while
# while counter <= 10:
#     break
#     print counter
#     counter = counter + 1
#     s = s + a
#     if counter == 5:
#         break
#while True:

counter = 0

sum = 0


# while counter == 0:
#     user_n = int(raw_input("Enter a number to sum:"))
#     print user_n
#     sum = sum + user_n
#     if user_n == 0:
#         print sum
#         print "The sum of your numbers is:", sum
#         break



# Name:
# Date:

# proj02: sum

# Write a program that prompts the user to enter numbers, one per line,
# ending with a line containing 0, and keep a running sum of the numbers.
# Only print out the sum after all the numbers are entered
# (at least in your final version). Each time you read in a number,
# you can immediately use it for your sum,
# and then be done with the number just entered.

#Example:
# Enter a number to sum, or 0 to indicate you are finished: 4
# Enter a number to sum, or 0 to indicate you are finished: 5
# Enter a number to sum, or 0 to indicate you are finished: 2
# Enter a number to sum, or 0 to indicate you are finished: 10
# Enter a number to sum, or 0 to indicate you are finished: 0
#The sum of your numbers is: 21

# counter = 0

#key word while
# while counter <= 10:
#     break
#     print counter
#     counter = counter + 1
#     s = s + a
#     if counter == 5:
#         break
#while True:

counter = 0

sum = 0


# while counter == 0:
#     user_n = int(raw_input("Enter a number to sum:"))
#     print user_n
#     sum = sum + user_n
#     if user_n == 0:
#         print sum
#         print "The sum of your numbers is:", sum
#         break



# Name: # Date: # proj02: sum # Write a program that prompts the user to enter numbers, one per line, # ending with a line containing 0, and keep a running sum of the numbers. # Only print out the sum after all the numbers are entered # (at least in your final version). Each time you read in a number, # you can immediately use it for your sum, # and then be done with the number just entered. #Example: # Enter a number to sum, or 0 to indicate you are finished: 4 # Enter a number to sum, or 0 to indicate you are finished: 5 # Enter a number to sum, or 0 to indicate you are finished: 2 # Enter a number to sum, or 0 to indicate you are finished: 10 # Enter a number to sum, or 0 to indicate you are finished: 0 #The sum of your numbers is: 21 # counter = 0 #key word while # while counter <= 10: #     break #     print counter #     counter = counter + 1 #     s = s + a #     if counter == 5: #         break #while True: # while counter == 0: #     user_n = int(raw_input("Enter a number to sum:")) #     print user_n #     sum = sum + user_n #     if user_n == 0: #         print sum #         print "The sum of your numbers is:", sum #         break