I am using repl.it to code a login/registration screen. The code in Python is below:
while True:
print("""
============MAIN MENU================
*Welcome*
1. Register
2. Login
3. Quit
""")
x=input("Enter choice:")
if int(x)==1:
register()
elif int(x)==2:
login()
elif int(x)==3:
print("Goodbye then!")
sys.exit()
It works fine, but on pressing option 3, it prints goodbye to the screen but then displays this error:
repl process died unexpectedly:
When I have used sys.exit in the past it just resorts to a simple exit (cursor flashing) and no error message.
What have I done wrong, and for teaching purposes, what are best practices here?