Python Write Better Python Cleaner Code Docstrings

Your docstring isn't correct. Got ' Gives a pleasant message about the student. '.

Add a docstring to Treehouse.student. It should say "Gives a pleasant message about the student.".

starter.py
class Treehouse:
    def student(self, name):
        ''' Gives a pleasant message about the student. '''
        return '{} is a great Treehouse student!'.format(name) 

1 Answer

Brandon White
seal-mask
MOD
.a{fill-rule:evenodd;}techdegree seal-36
Brandon White
Treehouse Moderator

Hi Shreya,

I’m pretty sure the reason your docstring isn’t passing the challenge is because it includes a space before and after the message.

Remove those and you should be fine. Nice work.