OOPS (Object Oriented Programming System)

OOPS (Object Oriented Programming System)

 
OOPS stands for Object Oriented Programming System


Class name should be Camel case.
Camel Case says make the first every word letter upper Case.

Camel case example:    MyName, AngelaYu, JazibMehmood, GooglePython




 
 class Student:
# This is attributes
def __init__(self):
self.name = "Angela"
self.age = 20
self.birth_year = 1999

# This is Method
def read(self):
print(f"Instructor {self.name} is reading.")

def write(self):
print(f"Instructor {self.name} is writing.")

obj = Student()
obj.write()
obj.read()




Post a Comment (0)
Previous Post Next Post