I'm writing a short program for my class and I'm stuck on the last portion. When I run the program, everything functions appropriately up until I get to the end of the code where I try to multiply the cost of two separate functions in order to define another. How can I rectify this?
Here is the code in full:
def main():
wall_space = float(input('Enter amount of wall space in square feet: '))
gallon_price = float(input('Enter the cost of paint per gallon: '))
rate_factor = wall_space / 115
total_gallons(rate_factor, 1)
total_labor_cost(rate_factor, 8)
total_gal_cost(rate_factor, gallon_price)
total_hourly_cost(rate_factor, 20)
total_cost(total_hourly_cost, total_gal_cost)
print()
def total_gallons(rate1, rate2):
result = rate1 * rate2
print('The number of gallons of required is: ', result)
print()
def total_labor_cost(rate1, rate2):
result = rate1 * rate2
print('The hours of labor required are: ', result)
print()
def total_gal_cost(rate1, rate2):
result = rate1 * rate2
print('The cost of the paint in total is: ', result)
print()
def total_hourly_cost(rate1, rate2):
result = rate1 * rate2
print('The total labor charges are: ', result)
print()
def total_cost(rate1, rate2):
result = rate1 * rate2
print('This is the total cost of the paint job: ', result)
print()
main()
I'm desperate here guys!