0% found this document useful (0 votes)
25 views

OOP in Python: by Intelligence Gateway

Object-oriented programming (OOP) in Python uses classes and objects to create reusable code and avoid repeating code (the DRY principle). A class acts as a blueprint or template that defines attributes and behaviors, while an object is an instance of a class that represents a real-world entity. Classes allow for the creation of multiple objects with similar attributes and behaviors.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

OOP in Python: by Intelligence Gateway

Object-oriented programming (OOP) in Python uses classes and objects to create reusable code and avoid repeating code (the DRY principle). A class acts as a blueprint or template that defines attributes and behaviors, while an object is an instance of a class that represents a real-world entity. Classes allow for the creation of multiple objects with similar attributes and behaviors.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 6

OOP in Python

By
Intelligence Gateway
Object Oriented Programming
In Python, Object-Oriented Programming (OOPs) is a programming
paradigm that uses objects and classes in programming.
The concept of OOP in Python focuses on creating reusable code. This
concept is also known as DRY (Don't Repeat Yourself).
Why OOP is necessary?
What is Class?

• It is a blueprint.

• It is a model.

• It is a template.
Example:
Class contain two things:

• Attributes Class

• Behaviors
Object Object Object
What is Object?
Object is an instance of a class. When class is defined, only the
description for the object is defined. Everything in python like: Integers,
strings, floating-point numbers, even arrays, and dictionaries, are all
objects.

You might also like