0
My code so far
def numerosPrimos(matrix):
lista_primos = []
for i in range(len(matrix)):
for a in range(len(matrix[i])):
if matrix[i][a] > 1:
for c in range(2,matrix[i][a]):
if matrix[i][a] % c != 0:
lista_primos.append(matrix[i][a])
print(f'Lista dos numeros primos da matriz: {lista_primos}')
Output:
Lista dos numeros primos da matriz: [15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 5, 5, 5, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 8, 8, 8, 8, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17]
The question was missing
– nosklo