Easy
Is a Dog an Animal?
With
class Animal and class Dog(Animal), read words dog or animal on one line. For each, make that object and print isinstance(obj, Animal) and isinstance(obj, Dog) on one line.Input
Words separated by spaces.
Output
One line per word.
Sample 1
Input
dog
Output
True True
Sample 2
Input
animal
Output
True False
Output appears here