0

[Solved] Problem with a Code Coach module for Python

I have a solution to the Paint price problem that gives me three good answers and two errors. I can't see the problem with it so maybe someone can help me: canvas = 40 paint = int(input())*5 total = canvas + paint def taxit(): tax = int(total * 1.1) print(tax) taxit()

26th Mar 2020, 12:54 AM
Curtis Dufour
Curtis Dufour - avatar
3 ответов
+ 2
Modified it a little import math canvas = 40 paint = int(input())*5 tax = (canvas + paint)/10 total = canvas + paint + tax print(math.ceil(total))
26th Mar 2020, 1:13 AM
Justus
Justus - avatar
+ 1
The math.ceil function is to round it up
26th Mar 2020, 1:13 AM
Justus
Justus - avatar
+ 1
Awesome thanks! I haven't played with all the math modules enough yet, forgot that one existed
26th Mar 2020, 3:03 AM
Curtis Dufour
Curtis Dufour - avatar