Last active
December 4, 2016 22:06
-
-
Save 4rzael/15330f2f9f901bc547df2bf3d828707d to your computer and use it in GitHub Desktop.
your_math_problem
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
#!/usr/bin/env python2 | |
from math import cos as f, radians as u, sin as k | |
def area(h,c): | |
return f(u(c))*k(u(c))*h/2 | |
if __name__ == '__main__': | |
import sys | |
if (len(sys.argv) < 3): | |
print "usage : %s HYPOTHENUSE ANGLE_IN_DEGREES" % sys.argv[0] | |
else: | |
print "result : %f" % area(float(sys.argv[1]), float(sys.argv[2])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment