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

Stuck creating an instance of my class

Instructions say to create an instance of my class, which I did by naming the class followed by a dot and a unique name, which is then followed by colon and a new line with four spaces and a print function. Please help

first_class.py
class Student:
    name = 'eddie'

    Student.me:
        print(name)

When I try running this code it say it's not correct.

1 Answer

Stivan Radev
Stivan Radev
1,475 Points
class Student:
     name = "eddie"

me = Student()
print(me.name)

Thanks for the help.