這是我所做的所有編碼,但我不斷收到此語法錯誤。這將在底部解釋更多。如何解決此語法錯誤?我很困惑
def main():
ActualValue()
AssessedValue()
printResult()
def ActualValue()
global actual_value
actual_value = float(input("Enter actual value:\t"))
def AssessedValue()
global assessed_value
global property_tax
assessed_value = 0.6 * actual_value
property_tax = assessed_value/100 * 0.64
def printResult():
print "n\For a property valued at $", actual_value
print "The assessed value is $", assessed_value
print "The property tax is $", property_tax
actual_value = None
assessed_value = None
property_tax = None
main()
這是我的代碼:
它口口聲聲說我有一個語法錯誤:
def printResult():
print "n\For a property valued at $", actual_value
print "The assessed value is $", assessed_value
print "The property tax is $", property_tax
請在您的文章在整個實際的錯誤信息。你也使用Python 2或3? – BrenBarn
這是Python 2.7還是3? – Rapptz
我正在使用pythong 3. –