def check_length(phrase):
# your if condition here
if len(phrase) < 30:
return 1
# your elif condition here
elif len(phrase) == 30:
return 2
# your else condition here
else:
return 3
#This is just for you to see what happens when the function is called
print check_length("hi, i am a phrase")
No comments:
Post a Comment