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

Output of Python degrees() function: