0
I’m having trouble with a check, I have a certain matrix with N rows and N columns, I need to go through it and know in which row and column have only odd numbers.
Go as far as I can go.
matriz = [[1, 2, 3], [3, 4, 6], [9, 6, 13]]
impares = []
for i in range(len(matriz)):
for j in range(len(matriz[i])):
if matriz[i][j] % 2 != 0:
impares.append(matriz[i][j])
print(impares)
From what I understand of your description of the problem is not to check whether an element of the matrix is odd but rather whether all row(s) and/or column(s). For your example only the first column.
– anonimo
That’s right bro, that’s what I got to show.
– Samuel