******** OBJECT ORIENTED PROGRAMMING IN PYTHON ******** Basics of Object Oriented Programming in Python from Sujith Kumar OBJECT: Objects are the basic run-time entities in an object-oriented system, They may represent a person, a place, a bank account, a table of data or any item that the program must handle. CLASS: A class is a special data type which defines how to build a certain kind of object.The class also stores some data items that are shared by all the instances of this class class student: “““A class representing a student ””” def __init__(self , n, a): self.full_name = n self.age = a def get_age(self): #Method return self.age The following program shows the How to initialize the members in Class, How to create Instances for particular Object and finally How to print existed data class Student: # Initializing the variables def __init__(self,name,age): self.fullname=name self.sage=age # Display the entered d...
Learn from the learners, learning is forever - Life is short it need Python programming !!!