Jun-20-2020, 12:12 AM
Note in your line 5, you're not testing if the user entered a blank name, you're testing whether it is the same as a separate input request (which is blank). That's not what you want, and it's confusing to the user.
Create some sort of loop that you stay in until your request is satisfied.
Create some sort of loop that you stay in until your request is satisfied.
while True: user_name = input('Please enter your name: ') if user_name == '': print("I'm sorry, I don't see your name. Let's try again.") # Could do other validation here besides just blank name. else: break print(f"Pleased to meet you {user_name}. Let's get started.")