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!
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
Kris Reid17,131 Points
Just_Right just not working!
I'm not sure why this isn't working! I'm following previous code examples. Perhams my logic is wrong? Can someone help me. It just says "Bummer: Try again" - Not very helpful!
def just_right(string): string =  if len(string) <5: print("Your string is too short") elif len(string) >5: print("Your string is too long") else: return True
Jennifer NordellTreehouse Teacher
Hi there! You're doing great, but there's a bit of a misunderstanding of the instructions here. The challenge asks you to return those strings, but you're printing the strings. Just as the
else clause has a
return statement, so should your
elif. When Treehouse is running your code, it's expecting to get back a response, but the only thing sending back a response is the
Hope this helps!
Also, you will not need the
string = . This declares an empty list that is overwriting what they are sending in.