0

Please help

Animal | | Mammal / | \ / | \ Cat Dog Primate | | Hacker The Animal class has a common “reply” method, and each class has its own “speak” method, which is called by the “reply” method. https://code.sololearn.com/ceOWajuEfUEp/?ref=app

5th Feb 2021, 10:03 AM
Semeniuk Bohdan
Semeniuk Bohdan - avatar
2 Antworten
+ 6
( 1 ) if name == 'main': should be if __name__ == '__main__': ( 2 ) return self.speak shoud be return self.speak() if you want to execute the method right away. https://code.sololearn.com/ca10a799a15A
5th Feb 2021, 10:12 AM
noteve
noteve - avatar
+ 3
It's `__name__`, not `name`. Also, it's "__main__", not "main". Finally, on line 3, you need to *call* the `self.speak` method.
5th Feb 2021, 10:12 AM
XXX
XXX - avatar