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
#1
Greetings. I am working on creating a calculator in python. My objective is to create a basic calculator to return the repair value and estimated profit. I keep getting error messages. Here is my code below along with the error message.

 

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 repair_cost():

    if Value_1 <= 30000:
        repair_cost = (60000) - (Value_1)
        
    elif Value_1 >= 30000:
        repair_cost = (Value_1) + 17000

repair_cost(Value_1)

profit = str(avg_sales_price) - str(Value_1) - str(repair_cost)
Error:
Traceback (most recent call last): File "C:/Users/Cupid/AppData/Local/Programs/Python/Python37/spreadsheet.py", line 33, in <module> repair_cost(Value_1) TypeError: repair_cost() takes 0 positional arguments but 1 was given
Reply


Messages In This Thread
Value Estimator Calculator getting a TypeError - by jaycuff13 - Mar-31-2019, 10:04 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Using ID3 Estimator for Decision Trees student6306 2 742 Jun-13-2023, 07:39 PM
Last Post: student6306
  Value Estimator Calculator jaycuff13 1 1,859 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