Q:

Why do Python's trigonometry functions give different results than my calculator?

I was trying to make a simple calculation program for trigonometry with right angled triangles given the possible values of "x", "none", and two others with numbers. I know about the functions math.cos(), math.sin(), etc. but they are giving me different numbers from what my calculator is giving me.Here's an example of some of the code I was trying to use:
if hyp == "none" and opp == "x":
    answer = adj * math.tan(ang)

After entering the values None for hyp, 6 for adj, x for opp, and 37 for ang, I receive the value:
-289.036

On my calculator, the same is met with '4.521'.  Why are they giving different results?

A:

Take a look at the documentation for the math.tan function in Python:

math.tan(x)
Return the tangent of x radians

This applies to all the trigonometric functions. You must convert degrees to radians first, with the math.radians function:
math.tan(math.radians(ang))

