Answer to Question #146095 in Python for Leroy Holmes Jr.

Question #146095
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

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS