17.8k views
5 votes
4.1 code practice edhesive
What am I doing wrong

4.1 code practice edhesive What am I doing wrong-example-1

1 Answer

6 votes

Your code is improperly indented.

The correct code looks like:

def main():

while True:

name = input("Please enter a name: (Nope to end) ")

if name == "Nope":

return

print("Nice to meet you {}".format(name))

main()

I hope this helps!

User AKFourSeven
by
4.8k points