+ 1
Code challenge ball park order: why this code from me do not work? :(
#Nachos and Pizza both cost $6.00. A Cheeseburger meal costs $10. Water is $4.00 and Coke is $5.00. Tax is 7%. lst = str(input()).split() dict = {"Nachos":6, "Pizza": 6, "Cheeseburger":10, "Water":4, "Coke":5} money = 0 for i in lst: if i in dict: money += int( dict[i] ) else: money += 5 money *= 1.07 print(money)
3 Answers
+ 9
Hieu Le Chi ,
You have to round off the value to two decimal places....as in sample output...
https://code.sololearn.com/caK67E3Dx3xd/?ref=app
+ 7
Try rounding the result to 2 decimals as shown in the example.
Compare the public test cases carefully with your own result.
+ 3
Thank you :)