Write a boolean function that returns False if the name has more than 4 letters.
1
Expert's answer
2020-11-23T16:37:34-0500
def check_length(name):
#check the length of the name
if len(name)>4:
#if it has more than 4 letters, return False
return False
else:
#return True otherwise
return True
Comments
Leave a comment