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 trialLennert Sieverding
5,266 PointsChallenge doesn't pass
Hello all,
My answer doesn't pass even though this works on my console. Since the code is really simple: what am I doing wrong here?
Cheers,
Lennert
class Student:
name = "Joe"
me = Student()
print (me.name)
3 Answers
Ari Misha
19,323 PointsHiya Lennert! You code is right on point , i put your code in the editor and i reduced that tab between your print and parenthesis and it worked. Try this out:
class Student:
name = "Joe"
me = Student()
print(me.name)
Chris Evergreen
2,857 PointsHi there!
Let's stick with the first version. The print function is actually print()
, not print ()
. The space is not necessary. Otherwise, everything else in your code is more or less correct.
Best of luck!
Lennert Sieverding
5,266 PointsThanks, that helped! Got away with the space until now.... ;-)
Chris Evergreen
2,857 PointsWell, looks like the Python Police got you good this time XD
Lennert Sieverding
5,266 PointsLennert Sieverding
5,266 PointsI also tried it by adding a function: