Welcome to Growing Code!
Learn Python basics while exploring community garden data. Every exercise is a small “seed” that grows into strong programming skills.
This project teaches Python fundamentals using real-world garden scenarios:
- Functions
- Input/Output (
input(),print()) - Variables & type conversion
- Loops & recursion
- Conditionals (
if / else) - String manipulation
You’ll create small programs that simulate gardening tasks while building your programming confidence. 💪
| # | File / Function | Description |
|---|---|---|
| 0️⃣ | ex0/ft_hello_garden.py |
Print a warm welcome to the garden community. 🌼 |
| 1️⃣ | ex1/ft_plot_area.py |
Calculate the area of a garden plot by asking for length & width. 📏 |
| 2️⃣ | ex2/ft_harvest_total.py |
Add up the harvested vegetables from 3 days. 🥬 |
| 3️⃣ | ex3/ft_plant_age.py |
Check if a plant is ready to harvest based on its age. 🌱 |
| 4️⃣ | ex4/ft_water_reminder.py |
Remind the gardener to water plants if it’s been >2 days. 💧 |
| 5️⃣ | ex5/ft_count_harvest_iterative.pyex5/ft_count_harvest_recursive.py |
Count days until harvest using loops & recursion. 🔄 |
| 6️⃣ | ex6/ft_garden_summary.py |
Print a summary of a garden with name, number of plants, and status. 📊 |
| 7️⃣ | ex7/ft_seed_inventory.py |
Track seed inventory by type and quantity. 🌾 |
- Writing functions like a pro
- Handling user input and printing output
- Using variables and arithmetic
- Making decisions with if / else
- Repeating actions with loops and recursion
- Working with strings:
capitalize(),upper(),title() - Organizing clean and readable code 🌟
project/ ├── ex0/ft_hello_garden.py ├── ex1/ft_plot_area.py ├── ex2/ft_harvest_total.py ├── ex3/ft_plant_age.py ├── ex4/ft_water_reminder.py ├── ex5/ft_count_harvest_iterative.py ├── ex5/ft_count_harvest_recursive.py ├── ex6/ft_garden_summary.py ├── ex7/ft_seed_inventory.py ├── main.py # helper to test your functions
- Clone the repo
- Run Python 3.10+
- Test each function using the main.py helper
- Watch your garden data come to life! 🌻
- Keep functions small & focused
- Test your code often
- Understand every line before submission
- Use recursion wisely, don’t forget base cases