LearnPy Hub
← Inheritance & Special Methods problems
Easy

What Class Is It?

Define Vehicle, Car(Vehicle) and Bus(Vehicle). Read class names (Vehicle, Car or Bus) on one line. For each, create that object and print type(obj).__name__ and its parent class name (type(obj).__bases__[0].__name__) on one line.

Input

Words separated by spaces.

Output

One line per word.

Sample 1

Input
Car
Output
Car Vehicle

Sample 2

Input
Bus
Output
Bus Vehicle
solution.py
Output appears here
What Class Is It? · Python practice problem · LearnPy Hub