Queer European MD passionate about IT

taqueria.py 509 B

123456789101112131415161718192021222324252627
  1. menu = {
  2. "Baja Taco": 4.00,
  3. "Burrito": 7.50,
  4. "Bowl": 8.50,
  5. "Nachos": 11.00,
  6. "Quesadilla": 8.50,
  7. "Super Burrito": 8.50,
  8. "Super Quesadilla": 9.50,
  9. "Taco": 3.00,
  10. "Tortilla Salad": 8.00
  11. }
  12. def main():
  13. total = 0.0
  14. while True:
  15. try:
  16. dish = input("Item: :\t\t").title()
  17. except EOFError:
  18. break
  19. if dish in menu:
  20. total += menu[dish]
  21. print(f"Total: ${total:.2f}")
  22. if __name__ == "__main__":
  23. main()