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 trialTrever Beets
1,117 Pointsi'm having some problems in the quiz after this "Help!" video. in the "fill in the blank" question.
in the Video it gives a few ways to get help with the str function but none of them have answered the question correctly. so somebody please help me understand exactly what this question is asking?
3 Answers
Mario Blokland
19,750 PointsHello again Trever,
I understand. You was almost had it though :-).
dir() doesn't help you in explaining what a method does or how to use it. It only shows the attributes of an object like the string object.
With help(str), you are asking Python for help with the string object in general. The question states to get help for the method "center" from the string object. Therefore you have to be a little bit more explicit (like you did with the rjust method). Therefore you have to slightley modifiy the call of the help(str.rjust) method which you called.
Let me know if you got it and you are welcome!
Trever Beets
1,117 PointsAwesome! thank you that certainly helped me out a lot.
Mario Blokland
19,750 PointsGreat to hear! Keep it going :D
Trever Beets
1,117 PointsI plan to i'm going to hopefully go from this to PHP and Ruby. altho i should probably finish the opening HTML course at some point.
Rashaad Prince
7,129 PointsGreat explanation Mario.
Mario Blokland
19,750 PointsThanks Rashaad Prince. Glad that it helped you.
Chase Kolozsy
976 PointsI had the same problem. It was really frustrating. I wasn't sure what the question was asking me to call help on.
help(str.what?!!!!!)
help(str)? no
help(methods)? no
help(methods.str)? no
help(str.methods)? no
help(str.help)? no
If the question was asked like this:
To get help for the method 'center' that also belongs to the str class, we would use_______
or if the question was asked like this:
To get help for the method: center, that also belongs to the str class, we would use_______
or if the question was asked like this:
To get help for the method, center, that also belongs to the str class, we would use_________
I would have immediately understood what I needed to do.
Sam Deacon
2,650 Pointspoorly worded question lol, took me forever to realise it was basically asking how do I look up str.center
Mario Blokland
19,750 PointsMario Blokland
19,750 PointsHi, can you post what answeres you have tried? I can then explain to you what might went wrong and make you understand it better.