I think there might be an error in : board[guess_row][guess_col] = 'X'
If this in incorrect it will affect the other exercises below.
Hope to get correction
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)