Python Forum
Value Estimator Calculator getting a TypeError
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Value Estimator Calculator getting a TypeError
#3
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") 
Reply


Messages In This Thread
RE: Value Estimator Calculator getting a TypeError - by jaycuff13 - Apr-01-2019, 09:40 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Using ID3 Estimator for Decision Trees student6306 2 812 Jun-13-2023, 07:39 PM
Last Post: student6306
  Value Estimator Calculator jaycuff13 1 1,906 Apr-03-2019, 12:52 PM
Last Post: j.crater

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020