As you can probably tell from the code below, I've been trying to get a float result, but everytimes I punch in the numbers, it always gives me an int. Any help would be appreciated.
def wallArea(x, y):
height = float(x)
width = float(y)
result = float(x*y)
return float(result)
def obsturctionArea(x, y):
height = float(x)
width = float(y)
result = float(x*y)
return float(result)
litre = float(12.0)
#UserInput
x=float(input("Please enter the height of your wall."))
y=float(input("Please enter the width of your wall."))
a=float(input("Please enter the height of the obtruction."))
b=float(input("Please enter the width of the obtruction."))
coats = float(input("How many coats of paint would you like?"))
totalArea = float(wallArea(x, y)-obsturctionArea(a, b))
result = float(totalArea/litre*coats)
print("You will need %d litres of paint." % (float(result)))