How do you solve python second exercise question number 5?

I have been trying to add the docstring to the function but I am never successful. If anyone is successful please help me

Can you share both your code and the test output/error (as text in a code block and not as an image)?