math.degrees(x) 將弧度值轉換為角度(deg = rad * 180 / π)。需先 import math。
math.degrees(x) # x 為弧度數值
>> import math
>>> math.degrees(3)
171.88733853924697
>>> math.degrees(-3)
-171.88733853924697
>>> math.degrees(0)
0.0
>>> math.degrees(math.pi) # π rad = 180°
180.0
>>> math.degrees(math.pi/2) # π/2 rad = 90°
90.0
>>> math.degrees(math.pi/4) # π/4 rad = 45°
45.0
math.radians(x):角度轉弧度。