LearnPy Hub
← Inheritance & Special Methods problems
Easy

Calling super()

Write Person(name, age) and Student(Person) that adds dept, using super().__init__. Print NAME (AGE), DEPT.

Input

Three lines.

Output

One line.

Sample 1

Input
Mim
20
CSE
Output
Mim (20), CSE

Sample 2

Input
Rafi
22
EEE
Output
Rafi (22), EEE
solution.py
Output appears here
Calling super() · Python practice problem · LearnPy Hub