From 66229a6155f45db910f49cb2b4fc972102ee5718 Mon Sep 17 00:00:00 2001 From: Donald Calloway Date: Thu, 16 Oct 2025 09:58:25 -0700 Subject: [PATCH] Adding ShoppingCartProgram.py --- ShoppingCartProgram.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 ShoppingCartProgram.py diff --git a/ShoppingCartProgram.py b/ShoppingCartProgram.py new file mode 100644 index 0000000..95c7f04 --- /dev/null +++ b/ShoppingCartProgram.py @@ -0,0 +1,25 @@ +# Shopping Cart Program + +foods = [] +prices = [] +total = 0 + +while True: + food = input("Enter a food item (q to quit): ") + if food.lower() == 'q': + break + else: + foods.append(food) + price = float(input("Enter a price $")) + prices.append(price) + total += price + +print("----- YOUR CART ----") +for food in foods: + print(food) + +print(f'\nYour total is: ${total}') + + + + \ No newline at end of file