0
Ballpark stank
I am getting 29.96 as answer to second test case with 29 being the total before tax order = input().split() sum = 0 for i in order: if i == 'Cheeseburger': sum += 10 elif "Water": sum += 4 elif "Nachos": sum += 6 elif "Pizza": sum += 5 elif "Coke": sum += 5 else: sum += 5 print(sum + (sum * 7/100))
5 Answers
+ 3
You forgot to compare with i in elif.
+ 2
Pizza and Nachos have same prices
elif i== "Nachos":
sum += 6
elif i== "Pizza":
sum += 6
+ 1
simple errors
Thanks Vasiliy!
+ 1
Show the assignment
0
i == "":
sum += 5