The following code was written to solve the Montyhole problem with Python.
for _ in range(trial):
Gift = random.randomint (0, 2)
player_choice = random.randint(0, 2)
Fail = []
for i in range(3):
If i!= player_choice and i!= Gift:
blank.append(door[i])
Here
ifi!= player_choice and i!= gift:
This line appears as IndentationError: unindent does not match any outer indication level. I think I wrote it well. Why is that?
python indentation errorcode
Python is different from other languages
Not brackets ({})
Use colons (:) and intent,
So if the indentation is not constant, the above error will occur
© 2024 OneMinuteCode. All rights reserved.