tubeshowcase●1,194,391 videos♡ My collection 0
← Learn to Code

Learn to Code08:10

Python concession stand program 🍿

Bro Code ↗

From the creator

#python #tutorial #course # Concession stand program menu = {"pizza": 3.00, "nachos": 4.50, "popcorn": 6.00, "fries": 2.50, "chips": 1.00, "pretzel": 3.50, "soda": 3.00, "lemonade": 4.25} cart = [] total = 0 print("--------- MENU ---------") for key, value in menu.items(): print(f"{key:10}: ${value:.2f}") print("------------------------") while True: food = input("Select an item (q to quit): ").lower() if food == "q": break elif menu.get(food) is not None: cart.append(food) print("------ YOUR ORDER ------") for food in cart: total += menu.get(food) print(food, end=" ") print() print(f"Total is: ${total:.2f}")

Published 2022-11-11 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.

Keep exploring Learn to Code