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 trialConrad Landicho
3,312 Pointsinitializing a sub-class [Solved]
Hi guys, I'm trying to complete this code challenge, but I'm getting a syntax error on init . Here's the Challenge question: Create a new class named Dragon that extends the Monster class. Don't forget to import Monster from monster. Give your Dragon an integer size attribute..
What am I doing wrong here? Please give me an insight....
Thanks, -Conrad
from monster import Monster
class Dragon(Monster):
def __init__(self, size = 1):
Chris Freeman
Treehouse Moderator 68,454 PointsGreat! Marking as [Solved]
Conrad Landicho
3,312 PointsConrad Landicho
3,312 Pointsnever mind .... I figured it out :-) I just added this one line:
self.size = size and it passed :-)