Kris Reid13,947 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 Staff
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.