From fee8a483987f400a618e09fcd73a69cf3f6c245b Mon Sep 17 00:00:00 2001 From: Tipragot Date: Wed, 4 Oct 2023 10:49:09 +0200 Subject: [PATCH] correction --- Chapitre 2 - Récursivité/exercices.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Chapitre 2 - Récursivité/exercices.py b/Chapitre 2 - Récursivité/exercices.py index 84e56be..13393e5 100644 --- a/Chapitre 2 - Récursivité/exercices.py +++ b/Chapitre 2 - Récursivité/exercices.py @@ -74,7 +74,7 @@ def bhaut(n: int): Affiche un triangle de points dont la hauteur et la largeur est de n points en ASCII art. Cette fonction est récursive. """ - if n == 0: return # Si n est égal a 0 on ne fais rien + if n == 0: return # Si n est égal a 0 on ne fait rien print("*" * n) # On affiche n points bhaut(n-1) # On fait appel à la fonction avec n-1 points pour afficher la ligne suivante @@ -83,7 +83,7 @@ def bbas(n: int): Affiche un triangle de points dont la hauteur et la largeur est de n points en ASCII art. Cette fonction est récursive. """ - if n == 0: return # Si n est égal a 0 on ne fais rien + if n == 0: return # Si n est égal a 0 on ne fait rien bbas(n-1) # On fait appel à la fonction avec n-1 points pour afficher la ligne suivante print("*" * n) # On affiche n points