|
14 | 14 |
|
15 | 15 | print("🍽️ Welcome to Vikram's Restaurant!") |
16 | 16 | 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}") |
30 | 19 | # Show menu to user |
31 | 20 | 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(): |
34 | 23 | print(f"{item} - ₹{price}") |
35 | 24 |
|
36 | 25 | print("\n📝 Let's take your order (type 'done' to finish):\n") |
37 | 26 |
|
38 | 27 | # Take order from user |
39 | 28 | order = {} |
40 | 29 | while True: |
41 | | - item = input("Enter item name: ").strip() |
| 30 | + item = input("Enter item name(If entered all type \"done\"): ").strip() |
42 | 31 | if item.lower() == 'done': |
43 | 32 | break |
44 | | - elif item in restaurant_menu: |
| 33 | + elif item in menu: |
45 | 34 | try: |
46 | 35 | quantity = int(input(f"Enter quantity for {item}: ")) |
47 | 36 | if item in order: |
|
57 | 46 | print("\n🧾 Your Bill Summary:\n") |
58 | 47 | total = 0 |
59 | 48 | for item, quantity in order.items(): |
60 | | - price = restaurant_menu[item] |
| 49 | + price = menu[item] |
61 | 50 | cost = price * quantity |
62 | 51 | total += cost |
63 | 52 | print(f"{item} x {quantity} = ₹{cost}") |
64 | 53 |
|
65 | 54 | 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!") |
67 | 56 |
|
0 commit comments