code: def main():
      
      print("\t\tCalculator\n\n")
      while True:
          user_input = input("expression or exit: ")
          if user_input == "exit":
              break
          try:
              print("The result is {0}".format(evaluate(user_input)))
          except Exception:
              print("invalid syntax!")
              user_input = input("expression or exit: ")
      print("program end")
docs: simple user-interface