GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com โ€” 10_Python_Modules/Python_Module_01 at main ยท SaraFreitas-dev/10_Python_Modules

Expand file tree

/

Python_Module_01

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

Python_Module_01

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
ex0
ex0
 
 
ex1
ex1
 
 
ex2
ex2
 
 
ex3
ex3
 
 
ex4
ex4
 
 
ex5
ex5
 
 
ex6
ex6
 
 
README.md
README.md
 
 

README.md

Outline

๐ŸŒฟ Python Module 01 โ€” Object-Oriented Garden Systems

This project is part of the 42 School Common Core and focuses on Object-Oriented Programming (OOP) in Python.

Building on the fundamentals learned in Module 00, this module introduces more structured and scalable programming concepts through the creation of a digital garden ecosystem.

The goal of this module is to understand and apply:

  • classes and objects
  • instance methods
  • class methods and static methods
  • encapsulation and data protection
  • inheritance and class hierarchies
  • code organization and reuse
  • nested helper classes
  • basic system design and architecture

Each exercise incrementally builds on the previous one, resulting in a cohesive and extensible system by the end of the module.


๐Ÿ“ Project Structure

Each exercise is placed in its own directory (ex0 to ex6) and contains only the files requested by the subject.

๐Ÿ“Œ Exercises Overview

Exercise 0 โ€” Planting Your First Seed

Introduces Python program structure and execution.

  • Uses if __name__ == "__main__"
  • Stores basic plant data
  • Prints formatted output

Concepts: program entry point, variables, execution flow


Exercise 1 โ€” Garden Data Organizer

Introduces the first class-based design.

  • Creates a Plant class
  • Stores name, height, and age
  • Manages multiple plant instances

Concepts: classes, objects, attributes


Exercise 2 โ€” Plant Growth Simulator

Adds behavior to plants.

  • Reuses the Plant class
  • Implements growth and aging
  • Simulates changes over time

Concepts: instance methods, state changes


Exercise 3 โ€” Plant Factory

Focuses on object creation.

  • Creates multiple plants efficiently
  • Uses constructors (__init__)
  • Displays structured output

Concepts: object initialization, reuse


Exercise 4 โ€” Garden Security System

Introduces data protection.

  • Implements SecurePlant
  • Protects data using validation
  • Uses getters and setters

Concepts: encapsulation, data integrity


Exercise 5 โ€” Specialized Plant Types

Introduces inheritance.

  • Base Plant class
  • Specialized plant types
  • Uses super() to reuse code

Concepts: inheritance, polymorphism


Exercise 6 โ€” Garden Analytics Platform

Combines all module concepts.

  • Manages multiple gardens
  • Uses a nested statistics helper
  • Implements a plant hierarchy
  • Calculates statistics and scores

Concepts: system design, nested classes, method types


โœ… Notes

  • Written for Python 3.10+
  • Fully compliant with flake8
  • Follows 42 naming conventions
  • Outputs match the subject examples exactly
You are visitor 01402503 โ€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800ร—600. No cookies required.