b34dacbmodule-00: add module-00
9 files changed, +54, -0
@@ -0,0 +1,4 @@
1+def ft_garden_name():
2+ name = input("Enter garden name: ")
3+ print(f"Garden: {name}")
4+ print("Status: Growing well!")
@@ -0,0 +1,4 @@
1+def ft_plot_area():
2+ length = int(input("Enter length: "))
3+ width = int(input("Enter width: "))
4+ print(f"Plot area: {length * width}")
@@ -0,0 +1,5 @@
1+def ft_harvest_total():
2+ total = int(input("Day 1 harvest: "))
3+ total += int(input("Day 2 harvest: "))
4+ total += int(input("Day 3 harvest: "))
5+ print(f"Total harvest: {total}")
@@ -0,0 +1,6 @@
1+def ft_plant_age():
2+ days = int(input("Enter plant age in days: "))
3+ if days > 60:
4+ print("Plant is ready to harvest!")
5+ else:
6+ print("Plant needs more time to grow.")
@@ -0,0 +1,6 @@
1+def ft_water_reminder():
2+ days = int(input("Days since last watering: "))
3+ if days > 2:
4+ print("Water the plants!")
5+ else:
6+ print("Plants are fine")
@@ -0,0 +1,5 @@
1+def ft_count_harvest_iterative():
2+ days = int(input("Days until harvest: "))
3+ for day in range(days):
4+ print(f"Day {day + 1}")
5+ print("Harvest time!")
@@ -0,0 +1,11 @@
1+def 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)
@@ -0,0 +1,11 @@
1+def ft_seed_inventory(seed_type: str, quantity: int, unit: str) -> None:
2+ seeds = seed_type.capitalize() + " seeds"
3+
4+ if unit == "packets":
5+ print(f"{seeds}: {quantity} packets available")
6+ elif unit == "grams":
7+ print(f"{seeds}: {quantity} grams total")
8+ elif unit == "area":
9+ print(f"{seeds}: covers {quantity} square meters")
10+ else:
11+ print("Unknown unit type")