0

# Paint Costs Code Coach

I think the description of the challenge is a bit misleading. It says "round up to the next integer number" but if I use math.ceil() I cannot pass all tests. Conversely, if I use the simple round() function I solve the challenge. The round() is not rounding up to the next integer number unless the decimal is higher than 6 or the decimal is .5 and the next integer is an even number. From the description I understand costs must be rounded up to the next integer regardless of the decimal.

3 Antworten

+ 2

Ruben ,
can you please link your current code here?

+ 1

I used math.ceil() and passed all test cases.
How you did calculate the cost?

+ 1

https://www.sololearn.com/coach/22?ref=app
This is the version that passes all tests.
My previous version had
import math
as first line and math.ceil(cost) in the print.