






def       _lowerCAmelCase       (      lowerCAmelCase		):







       '''simple docstring'''
       UpperCAmelCase	    =			len(__lowerCAmelCase		)
       UpperCAmelCase	    =			len(matrix[0]		)
       UpperCAmelCase	    =			min(__lowerCAmelCase	,      __lowerCAmelCase		)

       for row in range(__lowerCAmelCase		):
              # Check if diagonal element is not zero
              if matrix[row][row] != 0:
                     # Eliminate all the elements below the diagonal
                     for col in range(row + 1	,      __lowerCAmelCase		):
                            UpperCAmelCase	    =			matrix[col][row] / matrix[row][row]
                            for i in range(__lowerCAmelCase	,      __lowerCAmelCase		):
                                   matrix[col][i] -= multiplier * matrix[row][i]
              else:
                     # Find a non-zero diagonal element to swap rows
                     UpperCAmelCase	    =			True
                     for i in range(row + 1	,      __lowerCAmelCase		):
                            if matrix[i][row] != 0:
                                   UpperCAmelCase	    =			matrix[i], matrix[row]
                                   UpperCAmelCase	    =			False
                                   break
                     if reduce:
                            rank -= 1
                            for i in range(__lowerCAmelCase		):
                                   UpperCAmelCase	    =			matrix[i][rank]

            # Reduce the row pointer by one to stay on the same row
                     row -= 1

       return rank


if __name__ == "__main__":
 import doctest

 doctest.testmod()








"""simple docstring"""







def       _lowerCAmelCase       (      lowerCAmelCase		):







       '''simple docstring'''
       if not isinstance(lowerCAmelCase	,      lowerCAmelCase		):
              UpperCAmelCase	    =			F'''Input value of [number={number}] must be an integer'''
              raise TypeError(lowerCAmelCase		)
       if number < 0:
              return False
       UpperCAmelCase	    =			number * number
       while number > 0:
              if number % 10 != number_square % 10:
                     return False
              number //= 10
              number_square //= 10
       return True


if __name__ == "__main__":
 import doctest

 doctest.testmod()
