Battleships! - Play It, Sam - 15/19


Hello, please could I have some help with my code. I am not sure whats wrong with it! Code Link:


if (guess_row < 5) or (guess_col > 5):
            print "Oops, that's not even in the ocean."

Rows less than 5 aren't necessarily outside the ocean.
You might also want to check for negative numbers, and in your case also 0 since you've made the board 6x6 to get a row and column at index 5

If there's more then you'll have to explain what you mean by "wrong" - in what way does it misbehave, what are we looking for?


why do i get the error Global name randint is not defined everytimr i run the code?i dont understand


I have the same problem