A beginner-friendly Python project demonstrating the use of functions, modules, and third-party libraries using Python 3 and VS Code.
This repository contains the final submission for Module 4 of the Python Programming course.
The project focuses on writing reusable functions, organizing code into modules, and using external Python libraries.
- Created functions that accept parameters and return results
- Used docstrings to document functions
- Implemented default arguments and keyword arguments
- Performed mathematical operations such as:
- Addition
- Subtraction
- Multiplication
- Division
- Power
📁 Relevant files:
functions.pybasic_operations.pymath_operations.py
- Organized code into multiple Python modules
- Created separate files for different operations:
addition.pymultiplication.py
- Imported custom modules into a main script
- Demonstrated modular and reusable code structure
📁 Relevant files:
addition.pymultiplication.pymain.pymain_challenge.py
Why modules are important:
- Improve code readability
- Make code reusable
- Simplify maintenance
- Allow teamwork and scalability
- Explored third-party Python libraries
- Used the
requestslibrary to fetch data from a public API - Used the
matplotliblibrary to visualize data using graphs
📁 Relevant files:
fetch_data.pyplot_graph.py
The plot_graph.py script plots student marks using matplotlib to demonstrate basic data visualization.
- Python 3.x
- VS Code
- Required libraries:
pip install requests matplotlib
Run any script using:
python3 filename.py
Example:
python3 main.py python3 plot_graph.py
📁 Project Structure class-work/ │ ├── addition.py ├── multiplication.py ├── functions.py ├── basic_operations.py ├── math_operations.py ├── fetch_data.py ├── plot_graph.py ├── main.py ├── main_challenge.py ├── README.md └── pycache/
👨🎓 Author
Ian Module 4 – Python Programming