Python Program - Single level inheritance

preview_player
Показать описание
Implement the concept of single inheritance using python.

1) Create a base class named Person with instance member’s (name and age) and a constructor to initialize the data member’s

2) Create a derived class named Student from the base class Person with instance member’s (rollno and percentage) and a constructor to initialize the data member’s

3) Include method overriding with the method named ‘display’ to display the details of instance member’s

Using a Student object, display all the details of a student(rollno,
name, age and percentage)
Рекомендации по теме
Комментарии
Автор

thanq soo muchh for this wonderful video

MUTHYALAKRISHNACHAITANYA
Автор

In last we give person details in print statement it will display person details or not

vinayvini
Автор

Hi i have error student class doesn't take arguments

RatnapriyaSadala
Автор

Im getting error
--init--()missing 1 required positional arugument : 'age'
Like this
Please help me

jyoshnareddem