human
Program to check if a matrix is symmetric | Returns true if mat [ N ] [ N ] is symmetric , else false.
Driver code"
Solution in Python:
 ... Write me a code to program to check if a matrix is symmetric and the other steps required?
assistant
#Here is code to program to check if a matrix is symmetric and the other steps required.
 def isSymmetric ( mat , N ) :
	for i in range ( N ) :
		for j in range ( N ) :
			if ( mat [ i ] [ j ] != mat [ j ] [ i ] ) :
				return False
	return True
mat = [ [ 1 , 3 , 5 ] , [ 3 , 2 , 4 ] , [ 5 , 4 , 1 ] ]
if ( isSymmetric ( mat , 3 ) ) :
	print " Yes "
else :
	print " No "