<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def main():

 """
 simple user-interface
 """

    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")