LearnPy Hub
← Inheritance & Special Methods problems
Easy

Family Tree of Classes

Define Animal, Bird(Animal), Parrot(Bird) and Fish(Animal). Read lines A B until END and print issubclass(A, B).

Input

Lines, then END.

Output

Lines.

Sample 1

Input
Parrot Animal
Fish Bird
END
Output
True
False

Sample 2

Input
Bird Bird
END
Output
True
solution.py
Output appears here
Family Tree of Classes · Python practice problem · LearnPy Hub