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