Python math.degrees() – Convert Radians to Degrees

Contents

Python math.degrees()

math.degrees(x) function converts x radians into degrees and returns the degrees.

Syntax

The syntax to call degrees() function is

math.degrees(x)

where

ParameterRequiredDescription
xYesA numeric value that represents angle in radians.

Examples

In the following example, we convert 2 radians into degrees, using degrees() function of math module.

Python Program

import math

x = 2 #radians
result = math.degrees(x)
print('degrees(x) :', result)
Run Code Copy

Output

degrees(x) : 114.59155902616465

Now, let us convert one radian into degrees.

Python Program

import math

x = 1 #radians
result = math.degrees(x)
print('degrees(x) :', result)
Run Code Copy

Output

degrees(x) : 57.29577951308232

Summary

In this Python Examples tutorial, we learned the syntax of, and examples for math.degrees() function.

Related Tutorials

Code copied to clipboard successfully 👍