Question #100521

Write a program that asks the user to enter a name, and then prints Nice to meet you NAME. Your program should repeat these steps until the user inputs Nope.

Expert's answer

while True:
    user_name = input('Enter your name, please. If you want to stop program, enter "Nope": ')
    if user_name == 'Nope':
        break
    print('Nice to meet you {}'.format(user_name))
LATEST TUTORIALS
APPROVED BY CLIENTS