0
Paint Costs
Test case 3 always fails help me anyone Buy = int(input("")) def paint(n): color = n * 5 + 40 tax = color * 0.1 total = tax + color print(round(total)) n = Buy paint(n)
4 Answers
+ 2
Yes you need to round UP, not just round. Math.Ceiling(number) rounds up, whereas Round(number) just rounds in the nearest direction.
That is using C# syntax though, I'm unsure how to call it in Python.
+ 2
This was my solution which passed all cases. I'm sorry, I don't think you need to import a module for a task as small as this
def total_cost(num_of_paint):
num_of_paint = int(input())
x = num_of_paint
paint = 5.00 * x
canvas_and_brushes = 40.00
total_cost = paint + canvas_and_brushes
tax = total_cost/10
total_cost = total_cost + tax
total_cost = round(total_cost)
return int(total_cost)
print(total_cost(10))