diff --git a/concession_stand.py b/concession_stand.py new file mode 100644 index 0000000..ec49778 --- /dev/null +++ b/concession_stand.py @@ -0,0 +1,33 @@ +# Concession Stand Program + +menu = {"pizza": 1.50, + "soda": 2.00, + "popcorn": 6.00, + "pretzel": 2.50, + "candy bar": 0.90, + "hotdog": 2.75} + +cart = [] +total = 0 + +print("------------ MENU------------ ") +for key, value in menu.items(): + print(f"{key:15} ${value:.2f}") +print("------------------------------") + + +while True: + food = input("Select items from the menu (q to quit) ").lower() + if food == 'q': + break + elif menu.get(food) is not None: + cart.append(food) + + +print() +print("------------CART------------- ") +for food in cart: + print(food, end=" ") + total += menu.get(food) +print(f"\nYour total: ${total:.2f}") + \ No newline at end of file