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()
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))
+ 1
The math.ceil function is to round it up
+ 1
Awesome thanks! I haven't played with all the math modules enough yet, forgot that one existed