From 41d3bd84a7b171b5301915ae8522d86d7dbbfcd6 Mon Sep 17 00:00:00 2001 From: Tipragot Date: Thu, 19 Oct 2023 14:55:38 +0200 Subject: [PATCH] Fix global --- Chapitre 2 - Récursivité/C06_tp_fractales_koch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Chapitre 2 - Récursivité/C06_tp_fractales_koch.py b/Chapitre 2 - Récursivité/C06_tp_fractales_koch.py index 3e38b33..909ffe0 100644 --- a/Chapitre 2 - Récursivité/C06_tp_fractales_koch.py +++ b/Chapitre 2 - Récursivité/C06_tp_fractales_koch.py @@ -39,12 +39,12 @@ def fragment_koch(n, longueur): # Question 3 def koch(n): - global total """ Dessine un flocon de koch. La taille de chaque côté du triangle de départ est fixée par longueur = 100. La profondeur de récursion est limitée à n. """ + global total longueur = 300 total = 3 * (4**n) for i in range(3):