+ 1

# Ballpark order challenge. What's the problem???

Please, help. What's wrong with the code??? The test fails, although answers in first two tests are the same. Items = {"nachos": 6.00, "pizza": 6.00, "cheeseburger": 10.00, "water": 4.00, "coke": 5.00} Sum = 0 Order = input().lower().split() for a in Order: if a in Items: i=Items.get(a) else: i = 5.00 Sum=Sum+i print(Sum*1.07) Challenge: You and three friends go to a baseball game and you offer to go to the concession stand for everyone. They each order one thing, and you do as well. Nachos and Pizza both cost \$6.00. A Cheeseburger meal costs \$10. Water is \$4.00 and Coke is \$5.00. Tax is 7%. Task Determine the total cost of ordering four items from the concession stand. If one of your friendâs orders something that isn't on the menu, you will order a Coke for them instead. Input Format You are given a string of the four items that you've been asked to order that are separated by spaces. Output Format You will output a number of the total cost of the food and drinks.

13th Aug 2024, 6:32 PM
Alexandra