Python degrees() Function

math.degrees() function exists in Standard math Library of Python Programming Language. The purpose of this function is to convert the value of angle x from radians to degrees.

Syntax of degrees()

The syntax of degrees function in python is:
math.degrees( x )

 

Parameters of degrees()

x Any valid Python number (positive or negative). This parameter is required.
Note: if the x parameter is not a number, degrees() function returns an error.

 

Python degrees() Function Compatibility

Python 2.x – Yes
Python 3.x – Yes

 

Return Value of degrees()

The return value of degrees() is a floating point number ( a conversion of angle x from radians to degrees).

 

Python degrees() function Example

# import math library
import math
print(math.degrees(-0.2))
print(math.degrees(0.0))
print(math.degrees(60))
print(math.degrees(1))
print(math.degrees(45))

Output of Python degrees() function:
-11.459155902616466
0.0
3437.746770784939
57.29577951308232
2578.3100780887044