ここで私のコードは実際には無限ループを使用してint値をスキャンして比較します。 「:インデントブロックを期待indentationError」IndentationError:Pythonでインデントされたブロックのエラーが発生する可能性があります。可変スキャン時にエラーが発生します。
running = True
while running:
guess = int(input('Enter an integer : '))
if guess == number:
print 'Congratulations, you guessed it.'
# this causes the while loop to stop
running = False
elif guess < number:
print 'No, it is a little higher than that.'
else:
print 'No, it is a little lower than that.'
else:
print 'The while loop is over.'
# Do anything else you want to do here
print 'Done'
エラーがすべて表示されます。インデントを修正します。 – Julien
Pythonはインデントを使用してコードブロックをマークします。いくつかの基本的なPythonチュートリアルを見てください。詳細については、あなたのために説明します。 –
あなたの[pythonの基礎](https://docs.python.org/2/tutorial/appetite.html)を見直さなければならないと思います。 –