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!
4.4m questions
5.7m answers