+ 2
Where did i get it wrong ? ( Object-oriented programming -> Classes in py )
class Me: def _init_(self, name, complexion): self.name = name self.complexion = complexion def TOEFL(self): print("You've failed") class Loophole: def TOEFL(self): print("You've succeeded") me = Me("VH","Fair") me.TOEFL() Additional references would be appreciated Thanks
4 RĂ©ponses
+ 8
Há»ng VÄ© thanks for pasting the code :)
So the problem is with the 'init' . It should have __(double underscores) before and after it. Like ~
__init__(self, name, complexion)
Your code had only one ~
_init_(self, name, complexion)
Here's the corrected code for you
https://code.sololearn.com/cMf1erb6B68f/?ref=app
+ 13
Please elaborate more on your question. As in it's current form, it's not possible to answer without seeing your code
+ 3
wow
+ 2
sorry I'll just paste the whole code on the question