python_modules / module-00 / ex6 / ft_count_harvest_recursive.py 106 commits
09-05-2026
11 lines 280 B
 1def ft_count_harvest_recursive():
 2    days = int(input("Days until harvest: "))
 3
 4    def count(current, total):
 5        if current > total:
 6            print("Harvest time!")
 7            return
 8        print(f"Day {current}")
 9        count(current + 1, total)
10
11    count(1, days)