I am trying to execute the problem "Felipe´s Taqueria", but I am failing to see any price printed as output. Instead the program keeps asking for input.
When I input "Taco
", the output I get is "Item :
". And again, and again, and again...
What is wrong?
I changed the indentation as follows, but I have the same issue as before:
food_price = { "Baja Taco": 4.25, "Burrito": 7.50, "Bowl": 8.50, "Nachos": 11.00, "Quesadilla": 8.50, "Super Burrito": 8.50, "Super Quesadilla": 9.50, "Taco": 3.00, "Tortilla Salad": 8.00 }
while True:
try:
x = (input("Item : "))
for key, value in food_price.items():
if key == x:
x = value
print(f"{x} $")
x = x + x
print(f"{x} $")
else:
x = (input("Item : "))
except EOFError:
break