Ajout bbas
This commit is contained in:
parent
701101383f
commit
f1daf341ec
|
@ -78,6 +78,11 @@ def bhaut(n: int):
|
|||
print("*" * n) # On affiche n points
|
||||
bhaut(n-1) # On fait appel à la fonction avec n-1 points pour afficher la ligne suivante
|
||||
|
||||
def bbas(n: int):
|
||||
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
|
||||
|
||||
def pair(n: int) -> bool:
|
||||
"""
|
||||
Fonction récursive qui renvoie True si n est pair et False sinon.
|
||||
|
|
Loading…
Reference in a new issue