Created
August 22, 2018 12:48
-
-
Save melaku-z/1282e74256375b9b2a86530a225d967c to your computer and use it in GitHub Desktop.
simple python script that requires no installation or setting up. Just run it to get a command line that executes math calculations like "cos(2.4*pi)". I tried to emulate the matlab command line, but with faster start up.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from math import * | |
while True: | |
inputText = input('>> ') | |
try: | |
Result = eval(inputText) | |
print(Result) | |
except: | |
try: | |
exec(inputText) | |
print('executed') | |
except: | |
print('error') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment