Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Python

josiah dubose
josiah dubose
2,525 Points

Create a class w/method challenge

link to challenge: https://teamtreehouse.com/library/objectoriented-python/objects/create-a-class-with-a-method

This challenge won't let me pass. Here's my code:

alt text

Any input is greatly appreciated.

2 Answers

Steven Parker
Steven Parker
216,032 Points

It looks like you posted the same question twice. I just answered the other one.

But to recap, your function should only take one argument, self. Then inside the function, you will need to use "self." to prefix the variable names.

Fix that and you should be good!

:information_source: For future reference, screenshots are not nearly as helpful as actual code. Inside a challenge the "Get Help" button will usually provide the code (properly blockquoted!) along with a link to the challenge for you.

josiah dubose
josiah dubose
2,525 Points

Yeah I was trying to figure out how to post a screen shot of my code. Sorry about the duplicate. Thanks for your quick response