+ 2
Where am I going wrong here?
It keeps giving me a type error from the second definition under the class. I'm new to Python and I don't understand why. I've tried the pieces of code independent of each other and they worked. So where am I going wrong? please feel free to criticize as much as needed. I need to learn! https://code.sololearn.com/cR8FaaFt10Uh/?ref=app
2 Answers
+ 2
I updated the code and fixed it. The problem was I needed to change self.name to a string and the input into and integer. Also got rid of the Stu function as it served no purpose.
0
The output of the stu() function is None. That's why self.name is also None.