From 5d69f2982ed3c92be28a468d9fed1c3885425dbf Mon Sep 17 00:00:00 2001 From: Gilles Lassus Date: Thu, 16 Nov 2023 11:22:17 +0100 Subject: [PATCH] maj --- .../2.1_Listes/exercices.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/T2_Representation_des_donnees/2.1_Listes/exercices.md b/docs/T2_Representation_des_donnees/2.1_Listes/exercices.md index 8daded54..8131059c 100644 --- a/docs/T2_Representation_des_donnees/2.1_Listes/exercices.md +++ b/docs/T2_Representation_des_donnees/2.1_Listes/exercices.md @@ -196,19 +196,22 @@ === "Correction" - {{ correction(False, + {{ correction(True, " ```python linenums='1' - M=[[17, 3, 4, 14, 5, 17], [8, 16, 3, 17, 14, 12], [13, 5, 15, 4, 16, 3], [14, 7, 3, 16, 3, 2], [6, 1, 16, 10, 5, 13], [11, 1, 9, 11, 18, 8]] + M = [[17, 3, 4, 14, 5, 17], [8, 16, 3, 17, 14, 12], [13, 5, 15, 4, 16, 3], [14, 7, 3, 16, 3, 2], [6, 1, 16, 10, 5, 13], [11, 1, 9, 11, 18, 8]] def f(k): return (9*k + 3) % 19 - for _ in range(39): + def tour(): for i in range(6): for j in range(6): M[i][j] = f(M[i][j]) + for _ in range(39): + tour() + somme = 0 for i in range(6): for j in range(6):