The degrees()
function in Python converts the radian value to degrees.
Figure 1 shows a mathematical representation of the degrees()
function.
The
math
module is required for this function.
degrees(value)
The degrees()
function takes a
The degrees()
function then converts the radian value sent as a parameter to degrees.
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"