Python Tutorial Python Advanced Python References Python Libraries

Python math - radians() Function



The Python math.radians() function returns an angle measured in degrees to an approx. equivalent angle measured in radians.

Syntax

math.radians(arg)

Parameters

arg Required. Specify an angle in degrees.

Return Value

Returns the angle measured in radians.

Example:

In the example below, radians() function returns an angle measured in degrees into angle measured in radians.

import math

print(math.radians(30))
print(math.radians(60))
print(math.radians(90))
print(math.radians(120))

The output of the above code will be:

0.5235987755982988
1.0471975511965976
1.5707963267948966
2.0943951023931953

❮ Python Math Module

5