Play it Sam


#1

when i run this code , the code does not gives any output and it keeps running for long time. Can you please advise what causes this.
Checked this code in jupyter notebook and it ran successfully without any issues.


#2

The only thing off I see is that you have 4-space indents after line 27 (instead of 2 spaces), and lines 31 on aren’t indented correctly (they should be indented under the for command)


#3

Exactly. The for statement is an indefinite loop in its present form. The turn changes but nothing else happens.


#4

Thanks @mtf @rasmodeus


#5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.