Skip to content

Commit 604445b

Browse files
Refactored variable names, updated README and code flow
1 parent f086473 commit 604445b

1 file changed

Lines changed: 8 additions & 19 deletions

File tree

myapp/main.py

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,34 +14,23 @@
1414

1515
print("🍽️ Welcome to Vikram's Restaurant!")
1616
print("Here's our menu")
17-
print("""
18-
"Paneer Tikka": 180,
19-
"Chicken Wings": 220,
20-
"Spring Rolls": 160,
21-
"French Fries": 120,
22-
"Butter Chicken": 320,
23-
"Paneer Butter Masala": 280,
24-
"Veg Biryani": 200,
25-
"Chicken Biryani": 250,
26-
"Tandoori Roti": 20,
27-
"Butter Naan": 30,
28-
""")
29-
17+
for i, meal in enumerate(menu.keys(), start=1):
18+
print(f"{i}. {meal}")
3019
# Show menu to user
3120
print("🍽️ Welcome to Vikram's Restaurant!")
32-
print("Here's our menu:\n")
33-
for item, price in restaurant_menu.items():
21+
print("Here's our individual menu food prices\n")
22+
for item, price in menu.items():
3423
print(f"{item} - ₹{price}")
3524

3625
print("\n📝 Let's take your order (type 'done' to finish):\n")
3726

3827
# Take order from user
3928
order = {}
4029
while True:
41-
item = input("Enter item name: ").strip()
30+
item = input("Enter item name(If entered all type \"done\"): ").strip()
4231
if item.lower() == 'done':
4332
break
44-
elif item in restaurant_menu:
33+
elif item in menu:
4534
try:
4635
quantity = int(input(f"Enter quantity for {item}: "))
4736
if item in order:
@@ -57,11 +46,11 @@
5746
print("\n🧾 Your Bill Summary:\n")
5847
total = 0
5948
for item, quantity in order.items():
60-
price = restaurant_menu[item]
49+
price = menu[item]
6150
cost = price * quantity
6251
total += cost
6352
print(f"{item} x {quantity} = ₹{cost}")
6453

6554
print(f"\n💰 Total Amount to Pay: ₹{total}")
66-
print("\n🙏 Thank you for dining with us, come again!")
55+
print("\n🙏 Thank you for dining with us, you're welcome again!")
6756

0 commit comments

Comments
 (0)