Easy Tutorial
❮ Python Os Chflags Python Att List Copy ❯

Python math.degrees() Method

Python math Module

The math.degrees(x) method in Python converts angle x from radians to degrees.

PI (3.14..) radians equals 180 degrees, which means 1 radian equals 57.2957795 degrees.

The math.radians() method converts degree values to radians.

Python Version: 2.3

Syntax

The syntax for the math.degrees() method is as follows:

math.degrees(x)

Parameter Description:

Return Value

Returns a floating-point number representing the angle.

Example

The following example returns the degrees converted from different radians:

# Import math package
import math

# Print degrees converted from radians
print(math.degrees(8.90))
print(math.degrees(-20))
print(math.degrees(1))
print(math.degrees(90))

Output result:

509.9324376664327
-1145.9155902616465
57.29577951308232
5156.620156177409

Python math Module

❮ Python Os Chflags Python Att List Copy ❯