Question: in Python please A square matrix is considered a diagonal matrix if all the entries outside the main diagonal (top left to bottom right) are

in Python please
A square matrix is considered a diagonal matrix if all the entries outside the main diagonal (top left to bottom right) are zeros. Write a function called check_diagonal that takes a square matrix as parameter (nested lists) and returns True if it is a diagonal matrix and False if it is not. Save your function in a file called hw03_92.py. You may not import any modules for this problem. You can assume all the input matrices will be square matrices (i.e., you can assume all the matrices passed to the function have the same number of rows and columns). If an empty matrix is given, your function should return None
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
