The math.cos() function returns the cosine of a value given in radians.

Syntax:
math.cos(x)

Where x is the angle(in radians) whose cosine we want.

The function returns the cosine of the given number.

ExampleEdit & Run
import math

angle_in_deg = 20

angle_in_rads = math.radians(angle_in_deg)

print(math.cos(angle_in_rads))
Output:
0.9396926207859084[Finished in 0.011150806210935116s]

The math.radians() function takes takes an angle in degrees and returns its value in radians.

ExampleEdit & Run
import math

print(math.cos(math.radians(30)))
print(math.cos(math.radians(45)))
print(math.cos(math.radians(50)))
print(math.cos(math.radians(72)))
Output:
0.86602540378443870.70710678118654760.64278760968653940.30901699437494745[Finished in 0.010983336018398404s]

The range of values for the cosine of a number lies between -1 and 1.