Radians to degrees

Python, Math · Nov 2, 2020

Converts an angle from radians to degrees.

  • Use math.pi and the radian to degree formula to convert the angle from radians to degrees.
from math import pi

def rads_to_degrees(rad):
  return (rad * 180.0) / pi
from math import pi

rads_to_degrees(pi / 2) # 90.0

More like this

  • Degrees to radians

    Converts an angle from degrees to radians.

    Python, Math · Nov 2, 2020

  • Integer to roman numeral

    Converts an integer to its roman numeral representation. Accepts value between 1 and 3999 (both inclusive).

    Python, Math · Nov 2, 2020

  • Digitize number

    Converts a number to a list of digits.

    Python, Math · Sep 15, 2020