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


#1

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


#2

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


#3

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


#4

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


#5

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


#6

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.


#8

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

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


#9

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


#10

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.