Created
August 9, 2016 04:10
-
-
Save ridlo/b0fc906c2ea53b576e41ae26946f4eeb to your computer and use it in GitHub Desktop.
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
import sys | |
import math | |
filename = 'lalapo.txt' | |
param = math.pi | |
while (len(sys.argv) > 1): | |
option = sys.argv[1]; del sys.argv[1] | |
if option == '-f': | |
filename = sys.argv[1]; del sys.argv[1] | |
elif option == '-m': | |
param = float(sys.argv[1]); del sys.argv[1] | |
else: | |
print 'error, wrong option' | |
print filename | |
print param | |
print math.sin(param) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment