Following are the Python program to an input string value and print value with the message:
Program Explanation:
- Defining the while loop that runs condition is true.
- Defining a variable "user_name" that uses the input method to input value from the user-end.
- After input value the if conditional block is used that checks input value is equal to "Nope" when the condition is true it uses the break keyword and print values with the message.
Program:
while True:#defining loop that runs when condition is true
user_name = input('Enter your name:(Nope to end): ')#defining a variable user_name that input value
if user_name == 'Nope':#defining if block that checks input string value equal to Nope
break#using break keyword
print('Nice to meet you {}'.format(user_name))#print message
Output:
Please find the attachment.
Learn more:
brainly.com/question/18502091