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

Mikkel Bielefeldt
Mikkel Bielefeldt
3,227 Points

first_class.py

So I've been stuck at this question for some days now. Have already gotten for this exercise, but it seemed to be wrong. Then after getting a better understanding of how this Class stuff works, I still can't seem to write the right code for this program.

Class Student:
    name = "Mikkel Bielefeldt"

Then I kinda gets lost here. I think I've been very close to getting it right a few times, but apparently not 100 % correct.

1 Answer

Steven Parker
Steven Parker
229,785 Points

It's just a typo. You have "Class" with a capital "C" instead of "class" (Python is case-sensitive).

Mikkel Bielefeldt
Mikkel Bielefeldt
3,227 Points

It was an accident. I guess it was when I wrote this I accidentally wrote with a capital letter. It's in task number two the problem occurs.

Steven Parker
Steven Parker
229,785 Points

Only the task 1 code is shown here. Show the code you enter for task 2 and we can give you some pointers.