Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Python Object-Oriented Python Instant Objects Your first class

How do i make an instance of the following code

Now, make an instance of your class named me.

Then print() out the name attribute of your instance.

class Student:

2 Answers

This works for me, but if you have any questions feel free to ask.

class Student:
    name = 'YOUR NAME'

me = Student()

I think Tree house system has a bug this code is failing to work and please may you check your systems.

Tamara Orujzade
Tamara Orujzade
1,139 Points

Yes, it works. But the first three lessons remained vague for me. I'd expected clearer explanations.

It works for me. If you haven't tried my code, try it. But report a bug to this email help@teamtreehouse.com