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

Muhammad Haseeb Alam
Muhammad Haseeb Alam
5,930 Points

Not Working

working on my system but not on treehouse

first_class.py
class Student:
    name = "alam"


me = Student()
print me.name

1 Answer

Steven Parker
Steven Parker
229,787 Points

It sounds like you're running a rather old version (before 3.0) of Python at home. You may want to get a fresh one.

In the current version, "print" is a function, so when you use it there must be parentheses after it, with the argument inside them. Other than that, your code is good. :+1: