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 trial

Python Object-Oriented Python (retired) Inheritance Subclass

Nelson Chuang
Nelson Chuang
1,221 Points

no idea what to do

I don't understand the question.

my_monster.py
import monster

class Dragon(monster):
    size=5

2 Answers

It wants you to import the Monster class from the monster.py file. This means your import statement should be "from monster import Monster". You don't need to include the .py extension on the monster (lowercase) file. Then you use the uppercase Monster class as the parent that Dragon will inherit from. Other than that everything looks good. Sorry I'm on my phone so I'll submit this and then I can explain it better f you need more clarification.

Nelson Chuang
Nelson Chuang
1,221 Points

ok thanks I kept typing

import Monster from monster instead of from monster import Monster