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 trialMoatazBellah Ghobashy
Python Web Development Techdegree Student 2,940 PointsWhat is the wrong !!!
What is the wrong in my code , it generate Bummer! NameError:name 'just_righ' is not defined... Why!!!
def just_righ(n):
if len (n) < 5:
print("Your string is too short")
elif len (n) > 5:
print("Your string is too long")
else:
return True
1 Answer
tobiaskrause
9,160 Pointsdef just_right(n):
if len (n) < 5:
return "Your string is too short"
elif len (n) > 5:
return "Your string is too long"
else:
return True
There was never a word about printing the strings :) Also you missspelled the defenition name "just_right" you missed a "t".
But you understand, how the program should work and thats important. A lot of people think they should print something in this challange
MoatazBellah Ghobashy
Python Web Development Techdegree Student 2,940 PointsMoatazBellah Ghobashy
Python Web Development Techdegree Student 2,940 PointsThank you very much for your responding