Le danger
This commit is contained in:
parent
f1daf341ec
commit
3bb2edabbd
|
@ -79,6 +79,10 @@ def bhaut(n: int):
|
|||
bhaut(n-1) # On fait appel à la fonction avec n-1 points pour afficher la ligne suivante
|
||||
|
||||
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
|
||||
bbas(n-1) # On fait appel à la fonction avec n-1 points pour afficher la ligne suivante
|
||||
print("*" * n) # On affiche n points
|
||||
|
|
Loading…
Reference in a new issue