# shopping cart calculator modified with running total # initialize our control variable c = "yes" # intitialize total variable total = 0 total_tax = 0 # enter while loop while c == "yes": # ask user for price and perform calculations price = float(input("Enter an item price: ")) tax = .07 * price total_tax += tax total += (tax + price) print("Tax on this item is",tax,"; total price is",price+tax) # ask user if they want to continue # update control variable c = input("Would you like to enter another value? Enter 'yes' or 'no': ") # report totals to user print("Total amount due", total) print("Total tax due", total_tax)