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 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.

first_class.py
class Student:
    name="Atty"

2 Answers

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

class Student:
    name = 'YOUR NAME'

me = Student()
print(me.name)

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