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) Objects Instantiate

task 2 of 2

create an instance in monster called troll

my_monster.py
class Monster (object):
  justMonster = 1
  from  monster import Monster

8 Answers

Neither of these is very good responses..

With "import" I believe you are dealing with modules.

When dealing with an "instance" I believe you are dealing with a class?

Anyway here is what I figured out that seemed to pass:

The challenge is: http://teamtreehouse.com/library/instantiate

The two parts:

Challenge Task 1 of 2

Import just Monster from monster.

from monster import Monster

Challenge Task 2 of 2

Create an instance of Monster named troll.

from monster import Monster
troll = Monster()

for task 2 i create

from monster import Monster
troll = new Monster()

but wrong hehe i think use new like javascript

Tony McCabe
Tony McCabe
4,889 Points

Troll = Monster passed for me

Mikael Enarsson
Mikael Enarsson
7,056 Points

I'm not certain of what you are asking. Do you want to know how to create instances of classes?

Kenneth Love
STAFF
Kenneth Love
Treehouse Guest Teacher

Looking at your badges, you jumped way ahead in Object-Oriented Python instead of starting at the beginning. Why don't you go back to the beginning of the course and start there? You'll have a lot fewer questions.

from monster import Monster
    troll = Monster()
    type(troll)

where am geting it wrong

Kenneth Love
Kenneth Love
Treehouse Guest Teacher

Why are your last two lines indented?

please assist mi

thank you Kenneth i managed to surpass it