piscine 00

This commit is contained in:
David Gailleton
2025-12-18 15:39:15 +01:00
parent 029903f8dd
commit 01854a4fb7
9 changed files with 62 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
def ft_count_harvest_iterative():
print("Days until harvest:", end=" ")
i = range(1, int(input()) + 1)
for n in i:
print("Day", n)
print("Harvest time!")

View File

@@ -0,0 +1,9 @@
def ft_count_harvest_recursive(x=-1):
if x < 0:
print("Days until harvest:", end=" ")
x = int(input())
ft_count_harvest_recursive(x)
print("Harvest time!")
elif x > 0:
ft_count_harvest_recursive(x - 1)
print("Day", x)