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 trialAbdillah Hasny
Courses Plus Student 3,886 PointsError says the return value is not correct...
can someone help?
def just_right(aw):
if len(aw) < 5:
return "Your string is too short"
elif len(aw) > 5:
return "Your string is too long"
else:
return 1
1 Answer
Jason Anello
Courses Plus Student 94,610 PointsHi Alfred,
The challenge wants you to return True
if either of the 1st 2 conditions aren't met. You're returning 1 instead.
Abdillah Hasny
Courses Plus Student 3,886 PointsAbdillah Hasny
Courses Plus Student 3,886 Pointsoh thanks, correct answer
but i just know the 1 = True isn't ?
Jason Anello
Courses Plus Student 94,610 PointsJason Anello
Courses Plus Student 94,610 Points1 is considered a truthy value but not the same as True. They are different types. If the 1 had to be interpreted as a boolean then it would be
True
In this case the function needs to return the boolean value
True