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 trialY B
14,136 PointsNot clear what this challenge is asking
I'm really not clear what this challenge is asking exactly but it doesn't seem to pass the check?
(also I can see links to the relevant discussions in the forums for the videos, is there an equivalent for the challenges - so I can easily see the different ways people solved it (and also cut down on my stupid questions)?)
Thanks.
class Student:
def __init__(self, **kwargs):
self.name = kwargs( name = 'B')
2 Answers
Kenneth Love
Treehouse Guest TeacherWow, that one is badly described. Let me fix that. Thanks for pointing it out.
EDIT: updated the CC to better describe what you should do on that step.
To point out something in your provided code, kwargs
is a dictionary, so you wouldn't call it like a function.
Y B
14,136 Pointsok am I obviously being a bit thick here as this is not working?
class Student():
name = 'B'
def __init__(self, name):
self.name = name
Kenneth Love
Treehouse Guest TeacherNo, totally my fault. Got too many things going on today. It needs to be a keyword argument with a default value. Again, updated the prompt. All you need to change on your code is make it name="Some Default"
in the __init__
definition.
Sorry about that.
Jessica Nedved
575 PointsJessica Nedved
575 PointsThis is a big issue with Treehouse. I see this topic on internet forums all over the place. I wish some of the treehouse team would DO SOMETHING ABOUT IT. I'm new, and I don't like the way there is nothing to point me in the right direction, or a place to go and see others code for the challenges. I think the challenges need to be revised ASAP in order for users to learn faster instead of aimlessly beating around the bush (especially like your case where the question is worded poorly)