menu_items = ["French fries", "1/4 pound burger", "1/4 pound chesseburger", "1/2 pound burger", "1/2 pound cheeseburger", "Medium pizza", "Meidum pizza with extra toppings", "Large pizza", "Large pizza with extra toppings", "Garlic bread"]
menu_prices = ["$2.00", "$5.00", "$5.55", "$7.00", "$7.50", "$9.00", "$11.00", "$12.00", "$14.50", "$4.50"]
menu_codes = ["ff", "bb", "ccb", "vb", "vcb", "mp", "mpx", "lp", "lpx", "gb"]
order = input(str("Write the item code of the food you wish to buy: "))
quantity = input(int("How many units of the previous food do want? "))
if order == "ff" or "bb" or "ccb" or "vb" or "vcb" or "mp" or "mpx" or "lp" or "lpx" or "gb":
print("The item code was inputted correctly")
else:
print("The item code was inputted incorrectly")
if quantity == (0 < 100):
print("Quantity entered is inside acceptable range")
else:
print("Quantity entered is out of range")
This part is the list of the code, it is supposed to be the menu of a restaurant. The user should be able to input only items that are in the list (menu_codes) and any other value entered should be denied. And the quantity should only be between 1-100, and anything different should not be allowed. But for some reason, my "while" loop doesn't work, and it prints always the same thing, here is an example of the output of my code.
Write the item code of the food you wish to buy: this is not on the list
How many units of the previous food do want? 56
The item code was inputted correctly
Quantity entered is out of range