Intro

bla bla

Enoncé

Correction


matrice=[[0,0,0,1,0,0,0,0,0,0,0,1,0,0],
         [0,0,0,1,0,0,0,0,0,0,0,0,0,0],
         [0,0,0,1,0,0,0,0,0,0,0,0,0,0],
         [1,1,1,0,0,0,0,0,0,1,0,0,0,0],
         [0,0,0,0,0,1,0,0,0,0,0,0,0,0],
         [0,0,0,0,1,0,1,1,0,1,0,0,0,0],
         [0,0,0,0,0,1,0,0,0,0,0,0,0,0],
         [0,0,0,0,0,1,0,0,1,0,0,0,0,0],
         [0,0,0,0,0,0,0,1,0,0,0,0,0,0],
         [0,0,0,1,0,1,0,0,0,0,0,0,1,0],
         [0,0,0,0,0,0,0,0,0,0,0,0,1,0],
         [1,0,0,0,0,0,0,0,0,0,0,0,0,0],
         [0,0,0,0,0,0,0,0,0,1,1,0,0,1],
         [0,0,0,0,0,0,0,0,0,0,0,0,1,0]]

def mystere(matrice):
    compteur = 0
    nombre_lignes = len(matrice)
    nombre_colonnes = len(matrice[0])
    for i in range(nombre_lignes):
        for j in range(nombre_colonnes):
            if matrice[i][j] == 1:
                compteur = compteur + 1
    return compteur