LearnPy Hub
← Inheritance & Special Methods problems
Easy

Legs of Animals

Animal.legs() returns 4. Bird(Animal) overrides it to return 2. Read words animal or bird on one line and print the total number of legs.

Input

Words separated by spaces.

Output

One integer.

Sample 1

Input
animal bird
Output
6

Sample 2

Input
bird bird bird
Output
6
solution.py
Output appears here
Legs of Animals · Python practice problem · LearnPy Hub