2013-05-28 18 views
-2

現在我的程序說:unindent does not match any other indentation level。該部分看起來是這樣的:錯誤,不是真的在Python中錯誤

population -= (random.randint(1, 3)) 
           ^
            | 
+2

請包括完整的錯誤信息。 –

+1

請顯示實際的回溯和錯誤信息,以及顯示的行之前的行。 – geoffspear

+1

也許你有一個無與倫比的'('或'''此塊之前 –

回答

2

你在這一行缺少一個右),您可以通過添加一個右括號或通過移除左括號修復上面寫着

if wait2 == "Four": 

你有一個在

失蹤 )
population -= (random.randint(1, 3) 
+0

謝謝!!!我認爲我的整個程序是註定!我打算髮布此與py2exe –

+0

等待現在我的計劃說:取消縮進不匹配任何其他縮進級別 –

+0

被搞砸了看起來像這樣的代碼: –

0

前行:

if wait2 == "Four": 
       print("You Have Waited For Four Months") 
       money += (population * 6) 
       time.sleep(1.5) 
       print("From The Rent You Now Have $" + str(money) + " In Total")