Code Coach ballpark problem | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Code Coach ballpark problem

Can't pass the test case 4 rest is ok. This is my code.... def percentage(percent, whole): return (percent * whole) / 100.0 order=input("").split(" ") total=0 for i in order: if i == "Pizza": total+= 6 elif i == "Nacho": total+= 6 elif i == "Water": total+= 4 elif i == "Cheeseburger": total+= 10 elif i == "Coke": total+= 5 else: total+=5 print (total+percentage(7,total))

9th Jun 2020, 6:09 AM
Devendra kumar
Devendra kumar - avatar
2 Answers
+ 1
Yes it seems already solved but there was minor error coz of which test case 4 was not solved but thanks to Kuba Siekierzyński and 𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥 for the guidance
9th Jun 2020, 3:48 PM
Devendra kumar
Devendra kumar - avatar
0
Seems to be already solved (if anybody reads this).
9th Jun 2020, 1:56 PM
Sandra Meyer
Sandra Meyer - avatar