Programme :
class person:
def __init__(self, age, gender):
[Link] = age
[Link] = gender
class teacher(person):
def teaches(self):
print("I am teacher")
class student(person):
def studies(self):
print("I study")
teacher1 = teacher(40, "male")
student1 = student(20, "female")
teach = person('40', 'male')
stud = person('20', 'female')
print([Link], [Link])
[Link]()
print([Link],
[Link])
[Link]()
Output :