Le danger

This commit is contained in:
Tipragot 2023-10-04 10:40:13 +02:00
parent f1daf341ec
commit 3bb2edabbd
No known key found for this signature in database

View file

@ -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