Why do I get a “break outside of loop” error?
This will happen if your indentation is incorrect. Be sure you’ve indented your code inside of your
for loop. Everything that happens during a turn needs to go inside of the loop.
Then, inside of the
if statement that is inside of the
for loop, write the
break after telling the user they hit the battleship.
for turn in range(4): . . . if guess_row == ship_row and guess_col == ship_col: print "Congrats!" # BREAK GOES HERE . . .