Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Python Object-Oriented Programming (OOP)

📖 Overview

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.


📚 Topics Covered

🔹 Object-Oriented Programming (OOP)

  • Classes and Objects
  • Constructors (__init__)
  • Instance Attributes
  • Methods
  • Creating Multiple Objects

🔹 Practical OOP Exercises

  • Student Management System
  • Rectangle Area and Perimeter
  • Bank Account System
  • Circle Area Calculator
  • Book Management System

🔹 Python Decorators

  • Creating Custom Decorators
  • Function Wrappers
  • Greeting Decorator
  • Login Authentication Decorator
  • Execution Time Decorator
  • Price Discount Decorator

🔹 Properties (Getters & Setters)

  • @property
  • Getter Methods
  • Setter Methods
  • Data Validation
  • Read-Only Properties
  • Encapsulation using Private Attributes

🔹 Exception Handling

  • try
  • except
  • finally
  • Handling Built-in Exceptions
  • Custom Exceptions
  • Raising Exceptions

🔹 Custom Exception Projects

  • ATM Withdrawal System
  • Password Strength Validator
  • File Reader
  • Division Calculator
  • List Index Checker

🔹 Python Concepts Used

  • Classes
  • Objects
  • Constructors
  • Decorators
  • Properties
  • Encapsulation
  • Custom Exceptions
  • Error Handling
  • File Handling
  • Input Validation

🛠️ Technologies Used

  • Python 3
  • Jupyter Notebook

🎯 Learning Outcomes

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.

🚀 Getting Started

  1. Clone this repository.
  2. Open the notebook in Jupyter Notebook or JupyterLab.
  3. Run the cells sequentially.
  4. Practice each exercise and experiment with the code to strengthen your understanding.

👩‍💻 Author

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!

About

Python notebook covering Object-Oriented Programming (OOP), class,objects,decorators, getters & setters, properties, and exception handling with practical examples and coding exercises.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages