Hi, I'm trying to write a program that uses a while loop to ask a user for
multiple values then use the program to add all the values, however many
there may be, then print the sum.  I'm having trouble with the sum()
function.  My code is below:

con = "y"

while con == "y":

        AMT = float(input("What is the price of the item? $"))
        con = input("Would you like to continue? [y/n]")
        price = float(sum(AMT + AMT))
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to