Fixing Errors (Menu Problem)
Home | API | Notes |
import sys
total = 0
menu = {"burger": 3.99, "fries": 1.99, "drink": 0.99, "Burger": 3.99, "Fries": 1.99, "Drink": 0.99}
print("Menu")
for k,v in menu.items():
print(k + " $" + str(v))
ordering = True
while ordering:
food = input("Please select an item from the menu. Press enter when you are done.")
if food in menu:
total += menu[food]
print("Your total: $" + "{:.2f}".format(total))
else:
print("Your order will be ready soon!")
ordering = False