Below is a Python program that accomplishes the described task. The comments at the beginning of the program provide an overview of the functions and their purposes.
# Function to calculate the number of gallons of paint required
def calculate_paint_gallons(square_feet):
return square_feet / 112
# Function to calculate the hours of labor required
def calculate_labor_hours(square_feet):
return square_feet / 112 * 8
# Function to calculate the cost of paint
def calculate_paint_cost(gallons_needed, paint_price_per_gallon):
return gallons_needed * paint_price_per_gallon
# Function to calculate labor charges
def calculate_labor_charges(labor_hours, labor_rate):
return labor_hours * labor_rate
# Function to calculate the paint job cost for each room
def calculate_room_cost(square_feet, paint_price_per_gallon, labor_rate):
gallons_needed = calculate_paint_gallons(square_feet)
labor_hours = calculate_labor_hours(square_feet)
paint_cost = calculate_paint_cost(gallons_needed, paint_price_per_gallon)
labor_charges = calculate_labor_charges(labor_hours, labor_rate)
total_cost = paint_cost + labor_charges
return gallons_needed, labor_hours, paint_cost, labor_charges, total_cost