沒有結果,問題在哪里
sum=0
x=1
while True:
? x=x+1
? ?if x/2 == 0:
? ? ? ?continue
? ?sum=sum+x
? ?if x>100:
? ? ? ?break
print sum
C:\Python27\python.exe C:/Python27/qry/2016-7-5.py
? File "C:/Python27/qry/2016-7-5.py", line 5
? ? if x/2 == 0:
? ? ^
IndentationError: unexpected indent
Process finished with exit code 1
2016-07-05
代碼縮進4格是標準
2016-07-05
Python 是一個嚴格按照語法縮減來區分代碼的,你的代碼縮減有問題,你可以把我的代碼復制和你的做一下對比即可知道原因