# Program to check whether a matrix is diagonal or not # Get size of matrixrow_size=int(input("Enter the row Size Of the Matrix:"))col_size=int(input("Enter the columns Size Of the Matrix:"))matrix=[]# Taking input of the 1st matrixprint("Enter the Matrix Element:")for i in range(row_size):    matrix.append([int(j) for j in input().split()])# check except Diagonal elements are 0 or notpoint=0for i in range(len(matrix)):    for j in range(len(matrix[0])):        # check for diagonals element        if i!=j and matrix[i][j]!=0:            point=1            breakif point==1:    print("Given Matrix is not a diagonal Matrix.")else:    print("Given Matrix is a diagonal Matrix.")