While I'm testing my code, I made it print the column and row the ship would be in so I could test what shows up while if they guess correctly. When I guess correctly it comes up with the "Congratulations, you sunk my battleship!" like it should. But, it also shows the "You missed my battleship." and I was wondering if it was something wrong with my code or not.
Write your code below!
if guess_row == ship_row and guess_col == ship_col:
-->print "Congratulations! You sank my battleship!"
if guess_row not in range(5) or guess_col not in range(5):
-->print "Oops, that's not even in the ocean."
elif board[guess_row][guess_col] == "X":
-->print "You guessed that one already."
-->print "You missed my battleship!"
-->board[guess_row][guess_col] = "X"