在Python中获取语法错误并且不确定原因

时间:2014-09-23 20:40:53

标签: python python-3.x syntax-error

我正在尝试创建一个程序,询问一块房产的实际价值并显示评估价值和房产税。该县对财产的评估价值征收财产税,该财产税是财产实际价值的60%。对于评估值的每个$.72,财产税为$100

对我做错了什么建议?

#Create a program that asks for th actual value of a piece of property
# and display tge assessnebt value and property tax.
ASSESSED_VALUE = .60
PROPERTY_TAX=.72 *(ASSESSED_VALUE/ 100.00)

def main():
property_value = float(input('Enter property value: '))

def calcu_value(property_value)
assessed_value = property_value *assessed_value
property_tax = property_value * property_tax
# display totals of  
def display_calcu
print(property_value)
    format ('total_sales tax, '.2f'))
print(property_tax)
    format ('total_sales tax, '.2f'))

# Call the main function
main()

1 个答案:

答案 0 :(得分:0)

有很多语法问题。简化一下(我只是快速运行),试试这个:

#Create a program that asks for th actual value of a piece of property
# and display tge assessnebt value and property tax.
ASSESSED_VALUE = .60
PROPERTY_TAX=.72 *(ASSESSED_VALUE/ 100.00)

def main():
    property_value = float(input('Enter property value: '))
    assessed_value = property_value * ASSESSED_VALUE
    property_tax = property_value * PROPERTY_TAX

    print("Property value: {}".format(property_value))
    print("Property tax: {}".format(property_tax))
    print("Assessed value: {}".format(assessed_value))

# Call the main function
main()

至少在没有错误的情况下运行。