Skip to content

lyqsbf/python_piscine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

64 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Python Piscine

This project has been created as part of the 42 curriculum by yaqliu.


Practice repository for Python fundamentals, organized as progressive modules and exercises.

Overview

This repository currently includes modules module00 through module10.

  • module00 to module02: Python basics, functions, and exceptions
  • module03 to module05: data processing, I/O, and pipeline-style exercises
  • module06 to module07: packages, imports, and OOP design patterns
  • module08 to module10: advanced scripting topics and continuation modules

Most exercises are small standalone scripts. Some modules also include helper files, datasets, or archives used by the exercises.

Repository Layout

py_piscine/
β”œβ”€β”€ module00/
β”‚   β”œβ”€β”€ ex0/ ... ex7/
β”‚   └── ft_garden_summary.py
β”œβ”€β”€ module01/
β”‚   └── ex0/ ... ex6/
β”œβ”€β”€ module02/
β”‚   └── ex0/ ... ex5/
β”œβ”€β”€ module03/
β”‚   β”œβ”€β”€ ex0/ ... ex6/
β”‚   β”œβ”€β”€ data_generator.py
β”‚   └── helper scripts and archives
β”œβ”€β”€ module04/
β”‚   β”œβ”€β”€ ex0/ ... ex4/
β”‚   β”œβ”€β”€ sample_data.json
β”‚   └── text/archive assets
β”œβ”€β”€ module05/
β”‚   β”œβ”€β”€ ex0/ ... ex2/
β”‚   └── main.py
β”œβ”€β”€ module06/
β”‚   β”œβ”€β”€ alchemy/
β”‚   └── import/package exercises
β”œβ”€β”€ module07/
β”‚   β”œβ”€β”€ ex0/ ... ex4/
β”‚   β”œβ”€β”€ tools/
β”‚   └── card-game themed OOP exercises
β”œβ”€β”€ module08/
β”‚   └── ex0/ ... ex2/
β”œβ”€β”€ module09/
β”‚   └── ex0/ ... ex2/
β”œβ”€β”€ module10/
β”‚   └── ex0/ ... ex4/
└── README.md

Learning Goals

Module 00

  • basic syntax, variables, expressions
  • functions, conditionals, loops, recursion

Module 01

  • clean function design
  • typing, docstrings, and introductory OOP

Module 02

  • exception handling patterns
  • custom errors and defensive coding

Module 03

  • data structures and transformations
  • analytics-style scripting

Module 04

  • file reading/writing
  • stream and archive handling

Module 05

  • multi-step processing pipelines
  • composable data flow

Module 06

  • package structure and imports
  • module boundaries and dependency hygiene

Module 07

  • OOP architecture and interfaces
  • inheritance/composition in a card-game domain

Module 08-10

  • advanced scripting and Python concepts
  • continuation exercises by topic

Requirements

  • Python 3.10+ recommended
  • no external dependencies for most modules

Some exercises include their own local dependency files (for example, module08/ex1/requirements.txt). Install those only when needed for that specific exercise.

Quick Start

Run scripts from the repository root:

python3 module00/ex0/ft_hello_garden.py
python3 module01/ex0/ft_garden_intro.py
python3 module02/ex0/ft_first_exception.py
python3 module03/ex0/ft_command_quest.py
python3 module04/ex0/ft_ancient_text.py
python3 module05/ex0/stream_processor.py
python3 module06/ft_circular_curse.py
python3 module07/ex0/main.py
python3 module08/ex0/construct.py
python3 module09/ex0/space_station.py
python3 module10/ex0/lambda_spells.py

Suggested Study Workflow

  1. Complete modules in order (module00 -> module10).
  2. Finish each ex* before moving on.
  3. Run the script after every change.
  4. Keep filenames unchanged to match exercise expectations.
  5. Refactor only after behavior is correct.

Notes

  • Some modules include extra assets (.txt, .json, .tar.gz) used by exercises.
  • In module07+, several exercises are class-based and use main.py entry points.
  • If a script imports sibling files, run it from the repo root so relative paths remain stable.

Educational Use

This repository is for educational and personal learning purposes.

Please do not use this project for paid redistribution or resale.

License

This project is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0). See LICENSE.

About

🐍 Python Piscine for the 42 curriculum. Progressive exercises covering Python fundamentals, OOP, data processing, and advanced scripting across 11 modules.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages