-4
初心者アラート。これは私のtictactoeのコードであり、プレーヤーが再生可能な値(1-9)を入力したかどうかを確認しようとしているときに問題を見つけることができません。手伝ってくれてありがとう。入力が範囲内にあるかどうかを確認するためにwhileを使用するpython3
# the player now inserts input (coordinates of the field where he want his symbol written)
print('Player', p, ', go! Enter the position that you want to play.')
i = input()
i = int(i) - 1
while i in range(10,99):
print('entered number does not match any position in the game, try again')
break
else:
pass
は、しばらくの間に置き換えて使用する必要があります。 – Frogboxe
https://stackoverflow.com/help/how-to-askをご覧ください。 –