Share your repls and programming experiences

← Back to all posts
Python Object Subclass Error
ColinEdwardEdwa (1)

Can anyone tell me why it states that I did not declare my GradYear attribute?

Comments
hotnewtop
ZhongRietveld (30)

And your print is wrong.

ZhongRietveld (30)

I think because you have on line: 7

self.GradYear
But you must write:
self.GradYear=GradYear

ZhongRietveld (30)

@ZhongRietveld sorry for the text in the lay out. what is for the code.