0
I'm having trouble with OOP in Python
This is my first run at OOP in Python. Every time I run the code to get the stats of an employee, it shows None beneath it. I'm sure it might be something I missed in creating the method for it, but I'm not sure how to fix it. https://code.sololearn.com/csH6MH756YW3/?ref=app
3 Answers
+ 5
In this function (stat) you are not returning value so here None will be print
print(i.stat())
so just call function
+ 2
yes, just use i.stat()
not print(i.stat()) this will call the function (which prints the stat), but will also print the return value of i.stat() which is None.
0
Got it. Thank you!