PYTHON - OOP(OBJECT ORIENTED PROGRAMMING) - PART 1

OOP IN PYTHON -- To map with real world scenarios, we started using objects in code. This is called Object Oriented Programming. -- Utilizing functions reduces redundancy and enhances code reusability. CLASS AND OBJECT IN PYTHON -- Class is a blueprint which tells us that what features should a class have. -- All the information which we have to store in particular object and writing in a class is what we call blueprint for creating an object # First we have to define class * Creating class class Student: (Remember you always have to start class's name by capital letter) name = "Anshula" * After creating class, we need to create object Eg: s1 = Student () print(s1.name) (object and instances of class is same) ** Suppose there is a factory and you are required to create a class. class Car: color = "blue" bran...