Why this is failing in some places . | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why this is failing in some places .

Help me to solve it . https://code.sololearn.com/c1T8p461fif9/?ref=app

17th Sep 2021, 3:25 AM
Aakash Mitra
Aakash Mitra - avatar
2 Answers
0
I would suggest using float for all the calculations, then rounding at the end.
17th Sep 2021, 3:33 AM
Josiah Mathieu
Josiah Mathieu - avatar
0
import math And change this line tax = ((canvas + cost_paint )//10) To tax = math.ceil((canvas + cost_paint) * .1) You can get the input as an int()
17th Sep 2021, 4:42 AM
ChaoticDawg
ChaoticDawg - avatar