summaryrefslogtreecommitdiff
path: root/py00/ex6/ft_count_harvest_recursive.py
blob: f25372b1b73f0b52a4cfb7aa456da3db80e699df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
def ft_print_days(days, count):
    if days > 0:
        print("Day:", count)
        count += 1
        days -= 1
        ft_print_days(days, count)
    else:
        print("Harvest time!")


def ft_count_harvest_recursive():
    days = int(input("Days until harvest: "))
    count = 1
    ft_print_days(days, count)