cs50python icon indicating copy to clipboard operation
cs50python copied to clipboard

set3

Open rohit20032003 opened this issue 1 year ago • 0 comments

taqueria correct def main(): menu = { "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 }

total_cost = 0.0

while True:
    try:
        item = input("Item: ").title()
        if item in menu:
            total_cost += menu[item]
            print(f"Total: ${total_cost:.2f}")
    except EOFError:
        print()  # Print a new line for better formatting
        break

if name == "main": main()

rohit20032003 avatar Jun 28 '24 10:06 rohit20032003