-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSmall Menu Design.py
More file actions
79 lines (63 loc) · 2.23 KB
/
Copy pathSmall Menu Design.py
File metadata and controls
79 lines (63 loc) · 2.23 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#This is me first program
print("Hello, Welcome to our Barista Hotel!!!")
name = input("Enter your name please: ")
while name == "":
name = input("What's your name: ")
print(f"Hello {name}, thank you for coming in today\nHere is our Menu\n")
# Define menu items
drinks = ("Coffee", "Soda", "Milk")
food = ("Chapati", "Ugali", "Mchele")
takeaway = ("Chips", "Kuku", "Kebab")
# Display categories
print("MENU")
print("\nDRINKS:")
for i, item in enumerate(drinks, 1):
print(f" {i}. {item}")
print("\nFOOD:")
for i, item in enumerate(food, 1):
print(f" {i}. {item}")
print("\nTAKEAWAY:")
for i, item in enumerate(takeaway, 1):
print(f" {i}. {item}")
# Category selection
print("\nSelect a category:")
print("1. Drinks")
print("2. Food")
print("3. Takeaway")
category = input("\nEnter category number (1-3): ")
# Process selection
if category == "1":
print("\nYou selected Drinks:")
for i, item in enumerate(drinks, 1):
print(f" {i}. {item}")
item_choice = input("\nSelect drink (1-3): ")
if item_choice in ["1", "2", "3"]:
selected_item = drinks[int(item_choice) - 1]
print(f"\nYou selected: {selected_item}")
print(f"Thank you {name}! Your order has been placed.")
else:
print("Invalid selection!")
elif category == "2":
print("\nYou selected Food:")
for i, item in enumerate(food, 1):
print(f" {i}. {item}")
item_choice = input("\nSelect food (1-3): ")
if item_choice in ["1", "2", "3"]:
selected_item = food[int(item_choice) - 1]
print(f"\nYou selected: {selected_item}")
print(f"Thank you {name}! Your order has been placed.")
else:
print("Invalid selection!")
elif category == "3":
print("\nYou selected Takeaway:")
for i, item in enumerate(takeaway, 1):
print(f" {i}. {item}")
item_choice = input("\nSelect takeaway (1-3): ")
if item_choice in ["1", "2", "3"]:
selected_item = takeaway[int(item_choice) - 1]
print(f"\nYou selected: {selected_item}")
print(f"Thank you {name}! Your order has been placed.")
else:
print("Invalid selection!")
else:
print("Invalid category selection!")