Solutions will be available when this assignment is resolved, or after a few failing attempts.
Animal class provided with three more subclasses:
Include a method
talk in each one of the subclasses. The
talk method should return different options based on the type of animal:
Cat: should return
Dog: should return
Human: should return
test animals talking - Run Test
def test_animals_talking(): cat = Cat() dog = Dog() human = Human() assert isinstance(cat, Animal) assert isinstance(dog, Animal) assert isinstance(human, Animal) assert cat.talk() == 'Meow!' assert dog.talk() == 'Ruff!' assert human.talk() == 'Hello!'