I don't understand 11/19: Danger, Will Robinson


I have no idea how to continue. Thanks for any help!


Your else statement shouldn't have any space before it.


Thank you, changed it. Do you know how to continue further?


just press save and submit it should take you to the next lesson.


It gives me the error you can see in the command window


You said print ship_row & ship_col before it defined you can solve it by simply cup and paste the "print ship_row" and "print ship_col" after line 24.


if guess_row == ship_row and guess_col == ship_col:
print "Congratulations! You sank my battleship!"
print "You missed my battleship!"
board[guess_row][guess_col] = 'X'

I get the error : You're updating 'guess_row - 1' and 'guess_col - 1' instead of 'guess_row' and 'guess_col'.
Help, anyone?


You should have done this, because this tells the computer to print out the board with the x in it :


I was stuck on this problem for some time but after changing the numbers that I guessed from 0-5 to 0-4, it passed me. I'm not exactly sure why this is but if you are having problems and your code looks right, just try to change your guessing numbers.
Hope this helps.