On Apr 6, 5:10 pm, Mark Wooding <[EMAIL PROTECTED]> wrote: > Astan Chee <[EMAIL PROTECTED]> wrote: > > I have a math function that looks like this > > sin (Theta) = 5/6 > > How do I find Theta (in degrees) in python? > > import math > theta = math.asin(5/6) * 180/math.pi
Careful there, bud. 5/6 might not give you the value you're expecting it to, depending on the version of Python you're using. If you're on Python 2.x, you'll want to use "from __future__ import division", or to specify 5 and 6 as floats, i.e., 5.0/6.0. (And people claim 5/6 == 0 is the "obvious" result....) Carl Banks -- http://mail.python.org/mailman/listinfo/python-list