- 1

Python Paint cost challenge

what’s wrong with this code? when i run it one case (case 3) fails out of 5. def Color(x): r = x*5.00+40.00 t = r/10 return round(r+t) c = int(input()) print(Color(c))

19th Jan 2020, 5:01 AM
c cpp
2 RĂ©ponses
+ 8
Irshod Yakubi Try using ceil function for rounding value. import math as m def Color(x): r = x*5.00+40.00 t = r/10 return m.ceil(r+t) c = int(input()) print(Color(c))
19th Jan 2020, 5:28 AM
DishaAhuja
DishaAhuja - avatar
0
c=40 paint=int(input()) total =(c+paint*5) tax=(total *10//100) print (total + tax )
13th Sep 2022, 6:37 PM
KANDU SOBAN BABU
KANDU SOBAN BABU - avatar