0

Paint Costs

colours = int(input("")) tax = (40 + colours*5)* 1.1 import math print (math.ceil(tax)) when the input is 2 the output is 56 when it should be 55 pls advice Edit: Managed to solve like this colours = int(input("")) tax = (40 + colours*5)* 1.1 import math diff = tax - math.floor(tax) if diff < 0.1: print (math.floor(tax)) else: print (math.ceil(tax))

16th Jan 2020, 8:01 AM
Toh De Kai
Toh De Kai - avatar
5 Réponses
+ 4
16th Jan 2020, 9:31 AM
HonFu
HonFu - avatar
+ 3
https://code.sololearn.com/cUfxGXkKjS71/#py
16th Jan 2020, 9:30 AM
Aliman
Aliman - avatar
+ 2
Aliman Hi buddy, your code showed me that the info Ii posted was incorrect. Thanks for the correction
16th Jan 2020, 9:40 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 2
color = int(input()) prise = round((40 + 5 * color)*1.1) print (prise)
26th Apr 2020, 1:55 PM
Мансур Валиев
Мансур Валиев - avatar
+ 1
colour = int(input()) colours = 5 * colour painting = 40 + colours total = painting * 1.1 print (round(total))
27th Apr 2023, 5:21 AM
Jashwanth Goud
Jashwanth Goud - avatar