-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRestaurant.py
More file actions
35 lines (29 loc) · 832 Bytes
/
Restaurant.py
File metadata and controls
35 lines (29 loc) · 832 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Concession Stand Program
menu = {"Pizza": 400,
"Nachos": 180,
"Popcorn": 600,
"Fries": 120,
"Pasta": 180,
"Chips": 50,
"Soda": 100,
"Diet_Coke": 150}
cart = []
total = 0
print("--------MENU----------")
for key, value in menu.items():
print(f"{key:10}: Rs{value:.2f}")
print("-----------------------")
while True:
food = input("Select an item (q to quit): ")
if food.lower() == "q":
break
elif menu.get(food) is not None:
cart.append(food)
else:
print("Item not available. Please choose from the menu.")
print("--------ORDER----------")
for item in cart:
total += menu[item]
print(f"{item:10}: Rs{menu[item]:.2f}")
print("-----------------------")
print(f"Total is: Rs{total:.2f}")