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 trialgalhardoo
19,272 Pointsomg '-' where is wrong? I don't know DD:
Challenge Task 2 of 2
Override init in Student. Give init a name keyword argument with a default value of your choice. Set self.name equal to the name argument.
Bummer! object() takes no parameters
class Student:
name = 'alex'
def __init__(self, name= "bacon"):
self.name = name
1 Answer
Jennifer Nordell
Treehouse TeacherOk one more time. A method goes inside a class. It's a function specifically designated to be run on an object of that class. Fix your indentation again, and it passes
galhardoo
19,272 Pointsgalhardoo
19,272 PointsHAHAHAHA beginners... thanks again :D
Jennifer Nordell
Treehouse TeacherJennifer Nordell
Treehouse TeacherAlex Galhardo well I'm no expert, I promise. But the fact that you fixed it without copy/pasting the answer is great. There is no better way to learn to code than to break your code, and then fix it