radians()
function is used to find the Convert angle x from degrees to radians in Python for the given input(x – parameter).
Syntax of radians()
Function
The syntax of radians()
function in Python is:
math.radians(x)
Parameters of radians()
Function in Python
x
– Where x
is any valid python number (positive or negative). This parameter is required.Note: If the
x
parameter is not a number, radians()
function will return an Error.
Compatibility
radians()
function is available and compatible with both Python 2.x
and 3.x
. This function is a part of python standard math library.
Return Value of radians()
Function in Python
radians()
function returns Convert angle x from degrees to radians for the given input.
Python radians()
Function Example
# import math library import math print(math.radians(-0.2)) print(math.radians(0)) print(math.radians(0.2)) print(math.radians(77)) print(math.radians(-3677))
Output:
-0.003490658503988659
0.0
0.003490658503988659
1.3439035240356338
-64.1757565958315