inheritance | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

inheritance

why my code doesn't work https://code.sololearn.com/cIcktjl66g43

18th Apr 2020, 11:44 AM
Pavan Sirsat
Pavan Sirsat - avatar
1 Answer
+ 1
the problem is on line 13 print("The dates can be represented as :\n{}/{}/{}".format(self.dd,self.mm,self.yyyy)) you forgot to prefix your variables names with 'self.' to refer to the superclass it's better to use super() instead of the superclass name https://www.sololearn.com/learn/JUMP_LINK__&&__Python__&&__JUMP_LINK/2469/
18th Apr 2020, 12:08 PM
John Robotane
John Robotane - avatar