Any help? I have the following:
import math
def cosine (a):
x = (a * math.pi) / 180
return math.cos(x)
The problem: Create a function that calculates the cosine of an angle (in degrees). The math module contains a function math.cos that uses radians to calculate the cosine. You will need to convert the angle to radians first, then use the cos function to calculate cosine. Remember, you have to multiply the degrees by pi/180 to convert to radians.
Let me know! Am I using the cosine function wrong by using x as a parameter?