LearnPy Hub
← Classes & Objects problems
Easy

A Dog That Barks

Write class Dog with a name and a method bark() that returns NAME says Woof!. Read names on one line and print each dog's bark.

Input

One line.

Output

Lines.

Sample 1

Input
Rex Bella
Output
Rex says Woof!
Bella says Woof!

Sample 2

Input
Tom
Output
Tom says Woof!
solution.py
Output appears here
A Dog That Barks · Python practice problem · LearnPy Hub