The document presents a Python program defining a class hierarchy with a base class 'person' and two derived classes 'teacher' and 'student'. It creates instances of 'teacher' and 'student', demonstrating their specific methods and attributes. The output includes the age and gender of the instances and the respective actions of teaching and studying.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
3 views1 page
Python Ass
The document presents a Python program defining a class hierarchy with a base class 'person' and two derived classes 'teacher' and 'student'. It creates instances of 'teacher' and 'student', demonstrating their specific methods and attributes. The output includes the age and gender of the instances and the respective actions of teaching and studying.