this is the example matrix given:
2 3 5
4 6 9
3 1 10
i have to write 2 programs, one to find the sum of all even number in the matrix and one to find the transpose of the matrix (it doesn't say you can't make one program though)
from what i understand a transposed matrix is, it means switching the rows and columns, so the above matrix would look like this
2 4 3
3 6 1
5 9 10
right now i only have code written for the transposing part because i don't even know where to start with the even number adding part:
a = [[2, 3, 5],
[4, 6, 9],
[3, 1, 10]]
n=len(a)
def transpose(A, B):
for i in range(N):
for j in range(N):
B[i][j] = A[j][i]
print(a)