+ 4

Why isnt this Python OOP not working for me? - Python

Code: https://code.sololearn.com/ciakEQT93Z64/?ref=app I want it to output the def, Note then output the names, Sincerely, I cannot add the names, it’ll do a Error.

15th Feb 2019, 6:23 AM
Potato Hacker
Potato Hacker - avatar
2 ответов
+ 2
your note function should take self not s1 as an argument, animal takes 3 argument. one random.choice is enough. you are adding 3 + < which is impossible
15th Feb 2019, 7:12 AM
Zakariya Abubakar
Zakariya Abubakar - avatar
0
@line 16 instead of print(Animal(). Notes()... Use print(Aww.Note()..... Since you are declaring Animal without its required attributes
24th Feb 2019, 10:18 AM
Eric Kiser
Eric Kiser - avatar