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))
5 Réponses
+ 4
The problem is discussed here:
https://www.sololearn.com/discuss/2104980/?ref=app
+ 3
https://code.sololearn.com/cUfxGXkKjS71/#py
+ 2
Aliman
Hi buddy, your code showed me that the info Ii posted was incorrect.
Thanks for the correction
+ 2
color = int(input())
prise = round((40 + 5 * color)*1.1)
print (prise)
+ 1
colour = int(input())
colours = 5 * colour
painting = 40 + colours
total = painting * 1.1
print (round(total))