Answer to Question #112837 in Python for kiran

Question #112837
write a program that uses input to prompt a user for their name
1
Expert's answer
2020-04-29T13:58:10-0400
while True:
    # Prompt user to enter their name
    name = input('Enter your name: ')
    
    # Name field cannot be empty
    if len(name) > 0:
        break
    else:
        print('Field cannot be empty. Try again...')

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