Note: You need to press "Final Submit" for your
Program Editor
A food court facilitates their customers with a
featured App where the customers can view the
Menu Card and place their order. The order may
be delivered on-premises or off-premises as per
policies,
Write a code to take the order from the
customer by pressing
menu number.
Quantity
2
After one customer completes the process of
placing the order by pressing the Menu Number
and Quantity. your code should accept y to
continue taking order or n for stopping the
process of order taking,
Final Output should be the calculated total
amount.
Menu card is given as:
Number Name
Price
1 Veg Sandwich
80.0
2 Cheese Sandwich
130.0
3 Veg Grilled Sandwich 100.0
Contacte
Answers
Answer:
Here is the Code,
list = []
data = {1: 80, 2: 130, 3: 100, 4: 80, 5: 90, 6: 110, 7: 120, 8: 140, 9: 70, 10: 80, 11: 130, 12: 160, 13: 7, 14: 60, 15: 40, 16: 50, 17: 30, 18: 40, 19: 160, 20: 150}
def quantity():
a = int(input("Enter the Menu Item Number....."))
b = int(input("Enter the Quantity.............."))
# print(price)
cv = data[a] * b
print("You have ordered the item number.......", a)
print("You have ordered the quantity..........", b)
print("Total price..........................")
menu = a
total_quantity = b
cost = cv
q = (menu, total_quantity, cost)
list.append(q)
print(q)
print(cv)
c = input("Do you want to order more items........")
if c == "Yes":
quantity()
else:
for i in (0, len(list)):
print("You have ordered the item number.......", menu)
print("You have ordered the quantity..........", quality)
print("Total price..........................", cost)
quantity()