Home >>Python math Module >Python math.degrees() Method

Python math.degrees() Method

Python math.degrees() Method

Python math.degrees() Method in python is used to returns the angle value from radians in degree and , it accepts a number.

Syntax:
math.degrees(x)

Parameter Values

Parameter Description
x It is required a radian value to convert into degrees and it returns a TypeError
Here is an example of Python math.degrees() Method:

import math 
print (math.degrees(-4.13))
print (math.degrees(-4))
print (math.degrees(65))
print (math.degrees(1))

Output:
-236.63156938902998
-229.1831180523293
3724.225668350351
57.29577951308232
Example 2:

import math 
a = 0
print("math.degrees(",a,"): ", math.degrees(a))
a = 0.34
print("math.degrees(",a,"): ", math.degrees(a))
a = 2.65
print("math.degrees(",a,"): ", math.degrees(a))
a = -0.12
print("math.degrees(",a,"): ", math.degrees(a))

Output:
math.degrees( 0 ): 0.0
math.degrees( 0.34 ): 19.48056503444799
math.degrees( 2.65 ): 151.83381570966816
math.degrees( -0.12 ): -6.875493541569878

No Sidebar ads