2014-09-23 56 views
-4

我試圖創建一個程序,要求實際價值的一塊財產,並顯示評估價值和財產稅。本縣徵收房產評估值的財產稅,即房產實物價值的60%。物業稅爲$.72每個$100的評估值。在Python中獲取語法錯誤,不知道爲什麼

什麼我做錯了什麼建議?

#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() 
+0

你得到的錯誤是什麼**確切的文本**?此外,你的縮進全部搞砸了。請修復它。 – MattDMo 2014-09-23 20:44:39

+1

不好的縮進?函數定義的缺失一半?缺少引號和冒號? – jonrsharpe 2014-09-23 20:44:48

回答

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

運行沒有錯誤,至少。

相關問題