This repository contains a structured collection of Python exercises inspired by the Python programming course by Jadi Mirmirani. Exercises are grouped by topic and aim to reinforce both fundamental and intermediate Python concepts, as well as introduce some practical applications like web scraping and image processing.
- 01 – Data Structures
- 02 – Operators
- 03 – Control Flow
- 04 – Functions
- 05 – Object-Oriented Programming (OOP)
- 06 – Modules
- 07 – Error Handling
- 08 – Decorators
- 09 – Generators
- 10 – Web Scraping
- 11 – Image Processing
- 12 – File I/O
- 13 – Final Project
Each topic is organized in a dedicated folder. Inside, exercises are separated into individual files for clarity.
python-exercises/
├── 01-data-structures/
│ ├── ex01_string.py
│ ├── ex02_list.py
│ └── ...
├── 02-operators/
│ └── ex01_chaining.py
├── 03-control-flow/
│ ├── ex01_conditionals.py
│ └── ...
├── 04-functions/
│ ├── ex01_definition.py
│ └── ...
├── 05-object-orientation-programming/
│ └── ...
├── 06-modules/
│ └── ...
├── 07-error-handling/
│ └── ...
├── 08-decorators/
│ └── ...
├── 09-generators/
│ └── ...
├── 10-web-scraping/
│ ├── ex01_wscraping.py
├── 11-image-processing/
│ ├── encoder.py
│ └── ...
├── 12-file-io/
│ └── ...
├── 13-final-project/
│ └── todo-list/
| └── ...
├── README.md
├── requirements.txt
└── .gitignore
Each exercise file is self-contained and executable, and includes a description of the task.
This project requires Python 3.x.
Most exercises use Python's standard library. Some sections require external packages, which are listed in the requirements.txt file.
To install all necessary dependencies, run:
pip install -r requirements.txt-
Clone the repository:
git clone [https://github.com/YOUR_USERNAME/python-exercises.git](https://github.com/YOUR_USERNAME/python-exercises.git) cd python-exercises -
Install dependencies:
pip install -r requirements.txt
-
Run any exercise: Navigate into any topic folder and run a Python file. For example:
cd 04-functions python ex01_definition.py
Contributions are welcome! If you have an exercise you'd like to add or a bug to fix, please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/new-exercise). - Make your changes.
- Commit your changes (
git commit -m 'Add new exercise for topic X'). - Push to the branch (
git push origin feature/new-exercise). - Open a Pull Request.
This project is inspired by the Python course by Jadi Mirmirani (GitHub), a well-known Iranian tech educator.
Special thanks to him for providing accessible and high-quality programming content.
This project is open-source and available under the MIT License.
The original course content belongs to Jadi Mirmirani.
🌱 Happy coding and keep learning!