print("Welcome! Here is today's menu.")
print("")
print("- Coffee ($2)")
print("- Burger ($4)")
print("- Juice ($3)")
print("- Muffin ($2)")
print("- Burrito ($5)")
print("")
def student_order() :
order = input("What would you like to order today?: ")
print("")
if (order == 'Coffee'
or order == 'Burger'
or order == 'Juice'
or order == 'Muffin'
or order == 'Burrito'):
order_quantity = input("Quantity: ")
print("")
print("Thank you for your order! You ordered " + order_quantity + " " + order + ".")
coffee_count = 0
burger_count = 0
juice_count = 0
muffin_count = 0
burrito_count = 0
order_subtotal = 0
order_more = input("Anything else? (Yes or No): ")
while (order_more != 'NO' or order_more != 'no' or order_more != 'No'):
if (order_more == 'Yes' or order_more == 'yes' or order_more == 'YES'):
student_order()
if order == ('Coffee'):
coffee_count += order_quantity
elif order == ('Burger'):
burger_count += order_quantity
elif order == ('Juice'):
juice_count += order_quantity
elif order == ('Muffin'):
muffin_count += order_quantity
elif order == ('Burrito'):
burrito_count += order_quantity
else:
order_subtotal = (coffee_count * 2.00) + (burger_count * 4.00) + (juice_count * 3.00) + (muffin_count * 2.00) + (burrito_count * 5.00)
print("")
print("Thank you for your order!")
print("")
print("Your order subtotal is: $", order_subtotal)
print("")
order_tax = order_subtotal * 0.13
print("Your tax is: $", order_tax)
print("")
print("Your total is: $", (order_subtotal + order_tax))
print("")
print("Please pick up your order at the counter. Have a good day!")
break
else:
print("Sorry, " + order + " is not on today's menu. Please choose another item.")
student_order()
student_order()
Tried initializing food item counts to zero, but doesn't seem to add up correctly. How do I fix this? For example, I add 1 Juice, then add 2 Muffins. The Subtotal should be $7. Right now, it only shows $0 regardless of what quantity you put in. Maybe the order of the code is wrong, but that is just my guess.