Battle ship 13 partial error pls Help


#1

whenever i give inputs within the range 5 i get the appropriate output but if it exceeds 5

O O O O O
O O O O O
O O O O O
O O O O O
O O O O O
Guess Row: 2
Guess Col: 8
4
4

Traceback (most recent call last): File "python", line 32, in IndexError: list index out of range

my code:

line26>> # Write your code below!
if guess_row==ship_row and guess_col==ship_col:
print "Congratulations! You sank my battleship!"
else:
if (guess_row 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"


#2

Consider what this line is doing. What's supposed to happen with the piece in parenthesis?

Can you re-write the line to check for each of these two conditions separately?