Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐍 Python Object-Oriented Programming (OOPs)

A comprehensive collection of Python Object-Oriented Programming (OOP) practice programs designed to strengthen core OOP concepts through real-world examples and progressively challenging exercises.

This repository contains 30+ beginner-to-intermediate OOP problems covering classes, objects, methods, constructors, encapsulation, inheritance, polymorphism, getters & setters, and practical applications.


📌 About

This repository is a hands-on practice collection for mastering Python Object-Oriented Programming.

Each program focuses on understanding how OOP concepts work in real applications instead of simply memorizing syntax. The exercises gradually progress from creating simple classes to implementing inheritance, encapsulation, method overriding, and object interactions.


🚀 Topics Covered

Classes & Objects

  • Creating classes
  • Creating objects
  • Constructors (__init__)
  • Instance variables
  • Instance methods

Object Manipulation

  • Updating object attributes
  • Deleting object attributes
  • Printing object attributes
  • Using __dict__

Methods

  • Custom methods
  • Returning values
  • Display methods
  • Business logic methods

Functions inside Classes

  • Area calculation
  • Perimeter calculation
  • Discount calculation
  • Salary increment
  • Balance management

Encapsulation

  • Private attributes
  • Getter methods
  • Setter methods
  • Data hiding

Inheritance

  • Parent class
  • Child class
  • Single inheritance
  • Using super()

Polymorphism

  • Method overriding
  • Different behavior in child classes

Real-World OOP Projects

  • Student
  • Employee
  • Manager
  • Bank Account
  • Product
  • Customer
  • Laptop
  • Mobile
  • Book
  • Car
  • Vehicle
  • Bike
  • Teacher
  • Circle
  • Rectangle
  • Movie

Problem Solving

  • Salary increment
  • Product discounts
  • Rectangle calculations
  • Circle calculations
  • Bank transactions
  • Employee management
  • Object lists
  • Attribute modification
  • Attribute deletion

📂 Repository Structure

Python-OOP-Practice/
│
├── Classes & Objects
├── Constructors
├── Instance Variables
├── Methods
├── Object Manipulation
├── Encapsulation
├── Getter & Setter
├── Inheritance
├── Polymorphism
├── Method Overriding
├── Real-World Programs
└── Practice Questions

🎯 Learning Outcomes

After completing this repository, you will be able to:

  • Build classes from scratch
  • Create and manage objects
  • Understand constructors
  • Write reusable methods
  • Apply encapsulation
  • Work with private attributes
  • Implement getters and setters
  • Use inheritance effectively
  • Override methods
  • Use super()
  • Build real-world OOP applications
  • Improve logical thinking using OOP

🛠 Technologies

  • Python 3.x
  • VS Code

📖 Practice Difficulty

✅ Beginner

✅ Beginner+

✅ Intermediate


📚 Total Practice

  • 30+ OOP Practice Programs
  • Real-world examples
  • Progressive difficulty
  • Beginner-friendly implementations

👨‍💻 Author

Ankit Rai

Aspiring SQL Developer | Data Analyst

Currently Learning

  • Python
  • SQL
  • Power BI
  • Excel
  • Data Analytics

⭐ If this repository helped you, consider giving it a Star.

About

Hands-on Python Object-Oriented Programming (OOP) exercises covering classes, inheritance, polymorphism, encapsulation, and problem solving.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages