Python Object Oriented Programming(OOPS)

savant aakash
2 min readFeb 28, 2021

What is Class:

  • In python, Everything is Object To create objects we require some plan or model or Plan or BluePrint which is nothing but class
  • We can write a class to represent the Properties(Attributes) and actions (behavior) of an object.
  • Properties can be represented by variables
  • Actions can be represented by methods

In this above Definition OOps is such a type of programming paradigm in which particular problems according to the requirement of projects given by a client or you are working on a particular project.

Most of the particular projects that will be solving in real-world has to be solved by the OOPS principle

Let discuss how can we define a Class?

We can define class by using class keyword

Syntax: class classname:

‘’’documentation string’’’

variables:instance variables,static variables static and local variables

methods: Instance methods, static methods,class methods

Documentation String represents a description of the class Within class doc string is always optional

we can get docstring by using the following ways:

Basic example for class

Within the python class, we can represent data by using variables

3 types of Variables

  • Instance Variables(Object Level Variables)
  • Static Variables(Class Level Variables)
  • Local Variables(Method Level Variables)

Within Python class we can represent operations we can represent by using operations by using methods

Various types of allowed methods:

  1. Instance Methods
  2. Class Methods
  3. Static Methods

In the next Topic Discussion, we will discuss about objects reference variables we will discuss from basic and start coding OOPS from scratch

We will discuss get into details into basic details next objects and reference snd what does actually mean of self variable

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

savant aakash
savant aakash

Written by savant aakash

0 Followers

Introduction od oops in python

No responses yet

Write a response