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 trial

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,733 Points

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

1 Answer

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,860 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.