The math.acos() function returns the trigonometric inverse cosine(arc cosine) of a number.

Syntax:
math.acos(x)

Where x is the number for which you want to find the inverse cosine.

The function calculates the angle (in radians) whose cosine is equal to x.

ExampleEdit & Run
import math

number = 0.5
inverse_cosine = math.acos(number)

print(inverse_cosine)
Output:
1.0471975511965979[Finished in 0.01081932708621025s]

In the above case, the inverse cosine of 0.5 is approximately 1.0471975511965979 radians.

We can use the math.degrees function to turn the radians into degrees.

ExampleEdit & Run
import math

number = 0.5
inverse_cosine = math.acos(number)

print(math.degrees(inverse_cosine))
Output:
60.00000000000001[Finished in 0.010284285061061382s]
ExampleEdit & Run
import math

print(math.degrees(math.acos(0.7071067811865476)))

print(math.degrees(math.acos(0.30901699437494745)))
print(math.degrees(math.acos(0.17364817766693041)))
Output:
45.072.080.0[Finished in 0.010034172097221017s]