def main(): """ main-program purpose: handles user input and prints information to the console. """ print( "\nScientific Calculator\n\nFor Example: sin(rad(90)) + 50% * (sqrt(16)) + round(1.42^2)" + "- 12mod3\n\nEnter quit to exit" ) if sys.version_info.major >= 3: while True: k = input("\nWhat is ") if k == "quit": break result(k) else: while True: k = raw_input("\nWhat is ") if k == "quit": break result(k)
def main(): """ main-program purpose: handles user input and prints information to the console. """ print("\nScientific Calculator\n\nFor Example: sin(rad(90)) + 50% * (sqrt(16)) + round(1.42^2)" + "- 12mod3\n\nEnter quit to exit") if sys.version_info.major >= 3: while True: k = input("\nWhat is ") if k == 'quit': break result(k) else: while True: k = raw_input("\nWhat is ") if k == 'quit': break result(k)