Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialSahar Nasiri
7,454 PointsWhy is it wrong to give the size this way to the Dragon class?
def init(self, **kwarges): sel.size = kwarges.get('size', 0)
2 Answers
Josh Keenan
20,315 PointsYou have two typos.
def init(self, **kwargs):
self.size = kwargs.get('size', 0)
kwarges is spelt kwargs and sel.size should be self.size.
Moosa Bonomali
6,297 PointsAlso, If you need to instantiate your object with initial values then you need to use init def init(self, **kwargs): self.size = kwargs.get('size', 0)
Josh Keenan
20,315 PointsJosh Keenan
20,315 PointsFor the challenge you are doing you don't need a solution like this.
Here's mine