tg4/Chapitre 2 - Récursivité/exercices.py
2023-09-21 15:09:01 +02:00

18 lines
231 B
Python

def rebours(n):
if n == 0:
print()
return
print(n, end=" ")
rebours(n-1)
rebours(12)
def compte(t, n=1):
print(n, end=" ")
if n < t:
compte(t, n+1)
else:
print()
compte(5)