Override Animal Sounds

Define Animal.speak() to return 'Animal speaks'. Dog and Cat must inherit from Animal and override speak() to return 'Dog barks' and 'Cat meows'. make_animal_sounds(types) returns each sound in input order; accepted types are animal, dog, and cat.

Examples

  • [["dog","cat"]]["Dog barks","Cat meows"]

Your solution

Python

Results

Python starts when you run or submit this challenge.

Back to Lesson