What is math.degrees() in Python?
The degrees() function in Python converts the radian value to degrees.
Figure 1 shows a mathematical representation of the degrees() function.
The
mathmodule is required for this function.
Syntax
degrees(value)
Parameter
The degrees() function takes a
Return value
The degrees() function then converts the radian value sent as a parameter to degrees.
Code
import math#piprint "The value of degrees(PI) : ", math.degrees(math.pi), "Degrees"#0print "The value of degrees(0) : ", math.degrees(0), "Degrees"#-piprint "The value of degrees(-PI) : ", math.degrees(-math.pi), "Degrees"