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.

Laone Moshana
4,082 Pointspython oop with kenneth
am failing to understand oop ,from the first two videos i have watched am totally lost,please helf
class Student:
name = "Your Name"
def praise(self) :
return 'well done'.self
def_str_(self):
return self.name
1 Answer

Steven Parker
215,956 PointsHere's a few hints:
- nothing named "
def_str_
" has been defined, and it's not valid definition syntax - the instructions only ask for a "praise" method, nothing else will be needed
- a string has no "self" attribute
- you can use concatenation ("+" operator) to build up a string using a variable
- the syntax for a concatenated message might look like
'well done ' + self.name