python oops Concepts In Hindi

Python Oops In Hindi – Python OOPs Concepts In Hindi

Python

Python Oops In Hindi:- Python Object-Oriented Programming Language Hai Or Python OOPs Concepts In Hindi Mai 2 Prakar ke program paradigm ka use Kiya Jata Hai | Yah “Procedure Oriented” Or “Object-oriented programming” Hai | Aaj Ke Time Ki Sabhi  programming languages Object-oriented programming Ko Istemal Karti Hai 

Python Oops In Hindi

Python Oops In Hindi

Features of Object-Oriented Programming in Hindi

  • Class
  • Object
  • Method
  • Inheritance
  • Polymorphism
  • Data Abstraction
  • Encapsulation

Niche Diye Gaye Python Object-oriented Support ko Bataya Gaya hai |

Python OOPs Concepts In Hindi

Class

Class ek user-defined data type hai | ye C language mei structure ki tarah hi hota hai | lekin classes mei aap variable ke sath sath unse related functions bhi bana sakte hai | jinhe aap bad mei objects ke duvara access kiya ja sakta hai |

Class Definition Syntax:

class MyClass:
    "I am a Docstring"
    #class_body

Class Definition Example:

# A simple example class 
class Test: 
	# A sample method 
	def fun(self): 
		print("Hello") 

Objects

Class ek user-defined data type hai | Class type ke variables ko objects Kaha jata hai |

object creation syntax:

class_name object_name;

object creation example:

# Driver code 
obj = Test() 
obj.fun() 

Aapko Pta Hoga Ki Hamne Class Test Create Kiya Tha Upper Or Ab Hamne Us Class Ka Ek Test Obj Create Kiya Hai | Aap Kitne Bhi object create Kar Sakte Hai |

Class Output:

Hello

Method

Method Overriding Ye OOP Ka Ek Hissa Hai| Method Overriding Ka Istemal Inheritance Mai Kiya Jata Hai | Isme Ek Hi Name Ke Function Ko Alag Alag Class Mai Alag Alag Definition Di Jati Hai | Method Overriding Mai Function Ko Override Kiya Jata Hai |

Syntax for Method Overriding

class Base:
	def func(self):
	func_body
class Derived(Base):
	def func(self):
	func_body

Example for Method Overriding

class MyClass1:
    def func(self):
        a = 10
        print("Value of a :",a)

class MyClass2(MyClass1):
    def func(self):
        b = 5
        print("Value of b :",b)

obj = MyClass2()
obj.func()

Output:

Value of b : 5

Abstraction

Abstraction Means ki end-user ko Wahi functionality show ki Jaye Jiski Usko Jarurat hai | Baki background functionality hide Kar di Jaye |

Encapsulation

Encapsulation ko data hiding Bhi Kahte hai | Sath hi encapsulation Ke duvara data or functions ko outside access se protect Kiya Jata hai | Encapsulation ke 3 types hote hai ( Public, Private, Protected) ka protection provide karti hai |

Inheritance

Inheritance object-oriented programming ka concept hai | Jisme Ek code ko dusri jagah par istemal Kiya ja Sakta hai | ye code re-usability implement Karta hai |

Polymorphism

Python mei Polymorphism function overloading duvara implement kiya jata hai | jisme ek name ke functions ko alag alag conditions mei execute kiya jata hai |

Python Oops In Hindi

Abhi Tak Ham Ne Keval Python Oops Ke Conpect Ko Understand Kiya Hai Inke Har Ek Function Ke Liye Hamne Alag Se Post Publish Kiye Aap Unhe Bhi Read Kar Sakte Hai |

Also Read This Post :

Dosto mujhe ummed hai ki aap Python Object Oriented Programming in Hindi ko acchi tarah se samanj gye honge agar aap ko ye post acchi lage to mere is website ko jarur follow kre or ha agar aap video bhi dekhna chahte hai to aap mere channel ko bhi subscribe kar sakte hai. channel ka link aapko home page par mil jayega |

Leave a Reply

Your email address will not be published. Required fields are marked *