Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math, sys
- inst = sys.argv[1]
- lw = sys.argv[2]
- hi = sys.argv[3]
- h = sys.argv[4]
- inst = inst.replace("sin", "math.sin")
- inst = inst.replace("cos", "math.cos")
- inst = inst.replace("tan", "math.tan")
- inst = inst.replace("sqrt", "math.sqrt")
- inst = inst.replace("^", "**")
- f = open("output", 'w')
- x = lw
- while x <=hi:
- f.write(x + ' ' + eval(inst)+'\n')
- x+=h
- f.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement