14/19 Test Run Help


#1

If my guess is out of range it returns with an error instead of printing "Oops thats not even in the ocean!" I need some help fixing this
Here is my code

if guess_col == ship_col and guess_row == ship_row:
    print "Congratulations! You sank my battleship!"
    
elif board[guess_row][guess_col] == "X":
    print "You guessed that one already."
else: 
    print "You missed 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."
    else:
        board[int(guess_row)][int(guess_col)] = "X"
        print_board(board)

#2

Here's what I've got in that section where, when entering integers out of range, it appropriately outputs: 'Oops, that's not even in the ocean.'

if guess_row == ship_row and guess_col == ship_col:
    print 'Congratulations! You sank my battleship!'
else:  # if the user was incorrect
    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.'
    else:    
        print 'You missed my battleship!'
        board[guess_row][guess_col]='X'