This commit is contained in:
lfirmin
2026-01-07 21:42:11 +01:00
parent d02ef5f88a
commit 11040c45b8
25 changed files with 572 additions and 3 deletions
@@ -0,0 +1 @@
print("Hello, Garden Community!")
@@ -0,0 +1,4 @@
def ft_plot_area():
lenght = int(input("Enter length: "))
widht = int(input("Enter Widht: "))
print("Plot area:", lenght * widht)
@@ -0,0 +1,5 @@
def ft_harvest_total():
day = int(input("Day 1 harvest: "))
day += int(input("Day 2 harvest: "))
day += int(input("Day 3 harvest: "))
print("Total harvest:", day)
@@ -0,0 +1,6 @@
def ft_plant_age():
age = int(input("Enter plant age in days: "))
if age > 60:
print("Plant is ready to harvest!")
else:
print("Plant needs more time to grow.")
@@ -0,0 +1,6 @@
def ft_water_reminder():
day = int(input("Days since last watering: "))
if day > 2:
print("Water the plants!")
else:
print("Plants are fine")
@@ -0,0 +1,6 @@
def ft_count_harvest_iterative():
day = int(input("Days until harvest: "))
while day > 0:
print("Day", 5 - day + 1)
day = day - 1
print("Harvest time!")
@@ -0,0 +1,9 @@
def ft_count_harvest_recursive(day=None, last=None):
if day is None and last is None:
last = int(input("Days until harvest: "))
day = 1
if day > last:
print("Harvest time!")
return
print("Day", day)
ft_count_harvest_recursive(day + 1, last)
@@ -0,0 +1,4 @@
def ft_garden_summary():
name = input("Enter garden name: ")
number = input("Enter number of plants: ")
print("Garden:", name, "\nPlants:", number, "\nStatus: Growing Well!")
@@ -0,0 +1,11 @@
def ft_seed_inventory(seed_type: str, quantity: int, unit: str) -> None:
seed_type = seed_type.lower()
seed_type = seed_type[0].upper() + seed_type[1:]
if unit == "packets":
print(seed_type, "seeds:", quantity, unit, "available")
elif unit == "grams":
print(seed_type, "seeds:", quantity, unit, "total")
elif unit == "area":
print(seed_type, "seeds: covers", quantity, "square meters")
else:
print("Unknown unit type")