84.0k views
0 votes
[Edhesive] 4.1 Code Practice

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.

Sample Run:

Please enter a name: (Nope to end) Antonio
Nice to meet you Antonio
Please enter a name: (Nope to end) Jonathan
Nice to meet you Jonathan
Please enter a name: (Nope to end) Tyler
Nice to meet you Tyler
Please enter a name: (Nope to end) Brianne
Nice to meet you Brianne
Please enter a name: (Nope to end) Nope

[Edhesive] 4.1 Code Practice Write a program that asks the user to enter a name, and-example-1
User Olaf Kock
by
8.3k points

1 Answer

2 votes

Answer:

name = input("Enter a name, type Nope to end loop: ")

while (name != "Nope"):

print("Nice to meet you " + name)

name = input("Enter a name, type Nope to end loop: ")

print("Done")

Step-by-step explanation:

It works on python/Edhesive perfectly!

User Gerhardt
by
7.3k points