Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Python Python Basics (2015) Number Game App String length

What should my argument be?

I've put question marks in place of my argument as it says make my argument a string but when i do this it does not work. Please help, much appreciated.

strlen.py
def just_right(?????)
Kourosh Raeen
Kourosh Raeen
23,732 Points

Hi Rona - What have you tried as the parameter name?

1 Answer

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,704 Points

Hey Rona,

The challenge is much more than just the function declaration. What you put inside as the argument name actually doesn't matter, for simplicity, I would just use

def just_right(arg):

The important part of the challenge will be the body of the function you need to check the length of the string. You don't need to worry about passing in a string, the checker will do that for you, you just need to write the conditional that will check length against what is passed into arg by the checker.

Hopefully this help with being able to move forward. :)

:dizzy:

Thanks jason i know how to do the main body but i was unsure on whether the function argument should literally be a string, thanks for the help.