This repository contains a Jupyter Notebook that explores Object-Oriented Programming (OOP) concepts in Python through practical coding exercises and real-world examples. It also covers decorators, properties (getters and setters), and exception handling to build a strong foundation in writing clean, reusable, and robust Python programs.
- Classes and Objects
- Constructors (
__init__) - Instance Attributes
- Methods
- Creating Multiple Objects
- Student Management System
- Rectangle Area and Perimeter
- Bank Account System
- Circle Area Calculator
- Book Management System
- Creating Custom Decorators
- Function Wrappers
- Greeting Decorator
- Login Authentication Decorator
- Execution Time Decorator
- Price Discount Decorator
@property- Getter Methods
- Setter Methods
- Data Validation
- Read-Only Properties
- Encapsulation using Private Attributes
tryexceptfinally- Handling Built-in Exceptions
- Custom Exceptions
- Raising Exceptions
- ATM Withdrawal System
- Password Strength Validator
- File Reader
- Division Calculator
- List Index Checker
- Classes
- Objects
- Constructors
- Decorators
- Properties
- Encapsulation
- Custom Exceptions
- Error Handling
- File Handling
- Input Validation
- Python 3
- Jupyter Notebook
After completing this notebook, you will be able to:
- Design and implement Python classes and objects.
- Understand constructors and instance methods.
- Build reusable code using decorators.
- Protect object data using getters, setters, and properties.
- Handle runtime errors using exception handling.
- Create and use custom exceptions.
- Apply OOP concepts to solve real-world programming problems.
- Clone this repository.
- Open the notebook in Jupyter Notebook or JupyterLab.
- Run the cells sequentially.
- Practice each exercise and experiment with the code to strengthen your understanding.
Dilpreet Kaur
This repository is part of my Python learning journey, where I practice core Object-Oriented Programming concepts through hands-on coding exercises and real-world examples.
⭐ If you found this repository helpful, consider giving it a star!