LearnPy Hub
← Inheritance & Special Methods problems
Easy

Shape Names

class Shape has name() returning shape. Circle and Triangle inherit from it and override name(). Read shape words on one line and print each object's name() on one line.

Input

Words: circle, triangle or shape.

Output

One line.

Sample 1

Input
circle triangle
Output
circle triangle

Sample 2

Input
shape
Output
shape
solution.py
Output appears here
Shape Names · Python practice problem · LearnPy Hub