def main() -> None:
total = 0
while True:
try:
order = input(CONST_USER_PROMPT).strip()
total += CONST_MENU.get(order.title(), 0)
print(f"Total: ${total:.2f}")
except EOFError:
print()
break
if name == "main":
main()
## Steps to reproduce:
1. Run `python taqueria.py`
2. Enter the following items:
- `Burrito`
- `not in the menu`
- `burger`
3. Output:
![image](https://github.com/user-attachments/assets/f9183fad-8100-44d0-b3fc-5be189c82a04)
3. Run `check50 cs50/problems/2022/python/taqueria`
## Expected result:
1. `check50` should fail the validation
2. The description for the assignment contains the following:
> After each inputted item, display the total cost of all items inputted thus far, prefixed with a dollar sign ($) and formatted to two decimal places. Treat the user’s input case insensitively. <ins>**Ignore any input that isn’t an item**</ins>.
3. Demo showcases the reprompt on incorrect input:
![image](https://github.com/user-attachments/assets/0b8c66e1-8e24-479e-b953-0e123f808b3e)
4. The "How to test" section has the following:
> Run your program with python taqueria.py. Type Burger and press Enter. **Your program should reprompt the user.**
## Actual result:
1. `check50` passes the code
![image](https://github.com/user-attachments/assets/bda98915-62bd-4589-917b-92a198b22b1a)
2. test `:) input of "burger" results in reprompt` passes validation
Preconditions
taqueria.py
, which prints "Total: ..." when user enters item not in the menu:def main() -> None: total = 0 while True: try: order = input(CONST_USER_PROMPT).strip() total += CONST_MENU.get(order.title(), 0) print(f"Total: ${total:.2f}") except EOFError: print() break
if name == "main": main()