Apr-01-2019, 09:40 AM
Thank you for your help, i am trying to add an additional function onto the end that tells me whether a home is a good investment or not, but I am not getting the result that i am looking for. Here is my code
print("Welcome to Value Estimator") Value_1 = int(input("Please enter the value of target home:")) a1 = int(input("Please enter the value of the sales price of home #1:")) a2 = int(input("Please enter the sales price of home #2:")) a3 = int(input("Please enter the sales price of home #3:")) a4 = int(input("Please enter the sales price of home #4:")) a5 = int(input("Please enter the sales price of home #5:")) avg_sales_price = (a1 + a2 + a3 + a4 + a5)/ 5 print("Average sales price for homes in area is", avg_sales_price) ARV = str(avg_sales_price) print("The ARV for this home:" + ARV) def calc_repair_cost(Value_1): if Value_1 <= 30000: repair_cost = (60000) - (Value_1) elif Value_1 >= 30000: repair_cost = 20000 return repair_cost repair_cost = calc_repair_cost(Value_1) print("The repair cost for the home is:", + repair_cost) total_investment = Value_1 + repair_cost def home_rating(Value_1): if total_investment >= 60000: home_rating = False elif total_investment <= 60000: home_rating = True return home_rating worthy_investment = home_rating(Value_1) if home_rating == True: print("This home is worth a look") elif home_rating == False: print("This is not a good home")