Skip to content

Instantly share code, notes, and snippets.

@4rzael
Last active December 4, 2016 22:06
Show Gist options
  • Save 4rzael/15330f2f9f901bc547df2bf3d828707d to your computer and use it in GitHub Desktop.
Save 4rzael/15330f2f9f901bc547df2bf3d828707d to your computer and use it in GitHub Desktop.
your_math_problem
#!/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