11/19 Error


This is the if/else statements I used and I get the same error. Where did I go wrong?

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'

The error message is: You're updating 'guess_row - 1' and 'guess_col - 1' instead of 'guess_row' and 'guess_col'.



Probably in some other part of your code - make sure that the code you post reproduces the problem you describe!
I would guess that you didn't reset the board since you ran the code last time, and that you entered something like 4 4 this time, but 3 3 last time, which would mean that y-1, x-1 is marked with an X