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 trialbaderalsayegh
19,026 PointsBummer in this function
Hi guys here i am again this time i know my code is working properly is a workspace but when it comes to the treehouse activity it says bummer try again. idont know if the system have a problem because im sur it is working. can you help me thanks
def just_right(word):
a = int(len(word))
if a < 5:
print('"Your string is too short".')
elif a > 5:
print('"Your string is too long".')
else:
return True
2 Answers
Steven Parker
231,269 PointsThe challenge wants you to return the strings, not print them.
Also, they don't actually want quotes in the returned strings. Remove the inner quotes.
baderalsayegh
19,026 Pointstnx