while True: try: print(eval(input("calculator> "))) except Exception as e: print(e) except KeyboardInterrupt: print() quit()