Update interactive.py

  - Add a separate method to handle the 'exit' command.