LearnPy Hub
← Inheritance & Special Methods problems
Easy

Same Call, Different Results

Worker.work() returns working. Teacher returns teaching and Doctor returns healing, both inheriting from Worker. Read job words on one line and print what each object's work() returns, one per line.

Input

Words: worker, teacher or doctor.

Output

One line per word.

Sample 1

Input
teacher doctor
Output
teaching
healing

Sample 2

Input
worker
Output
working
solution.py
Output appears here
Same Call, Different Results · Python practice problem · LearnPy Hub