LearnPy Hub
← Inheritance & Special Methods problems
Easy

Animal Sounds

Animal has speak() returning '...'. Dog, Cat and Cow override it with Woof, Meow and Moo. Read lines kind name until END and print NAME says SOUND; unknown kinds use Animal.

Input

Lines, then END.

Output

One line each.

Sample 1

Input
dog Bhulu
cat Mini
END
Output
Bhulu says Woof
Mini says Meow

Sample 2

Input
fish Nemo
END
Output
Nemo says ...
solution.py
Output appears here
Animal Sounds · Python practice problem · LearnPy Hub