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