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 trialWesley Sinks
15,290 PointsWhat am I missing here??
Am I missing a step somehow on this one?
def just_right(i):
if len(i) < 5:
print("Your string is too short")
elif len(i) > 5:
print("Your string is too long")
else:
return True
1 Answer
Wesley Sinks
15,290 PointsI see I was supposed to return the strings, not print them. All good!
Wesley Sinks
15,290 PointsWesley Sinks
15,290 PointsSorry, I see the challenge details weren't included.
I'm supposed to define a function that takes one string as an argument, prints some text if it's less than 5 chars long and different text if more than 5 chars. Lastly, return True if the length is "just right"