Q16Multiple correct3 Marks28 Apr 2024
Consider the function fun defined below that accepts a square matrix as argument and returns a Boolean value. Select all matrices for which the function returns the value True.
```
def fun(M):
n = len(M)
for i in range(n):
for j in range(n):
if i != j and M[i][j] != 0:
return False
if i == j and M[i][j] != M[0][0]:
return False
return True
```