YouTip LogoYouTip

Python3 Func Number Radians

# Python3.x Python3 radians() Function [![Image 3: Python3 Numbers](#) Python3 Numbers](#) * * * ## Description The **radians()** method converts degrees to radians. The relationship between degrees and radians is: 2Ο€ radians = 360Β°. Therefore, 1Β° β‰ˆ 0.0174533 radians, and 1 radian β‰ˆ 57.29578Β°. * 1) Formula for converting degrees to radians: radians = degrees Γ· 180 Γ— Ο€ * 2) Formula for converting radians to degrees: degrees = radians Γ— 180 Γ· Ο€ ### Syntax Here is the syntax for the radians() method: import math math.radians(x) **Note:** radians() cannot be accessed directly. You need to import the math module and then call the method via the math static object. * * * ### Parameters * x -- A numerical value representing an angle, with the default unit being degrees (Β°). * * * ## Return Value Returns the radian value of an angle. * * * ## Example The following examples demonstrate the use of the radians() method: ## Example #!/usr/bin/python3 import math print("radians(90) : ",math.radians(90))# 1 radian is approximately 57.3Β° print("radians(45) : ",math.radians(45)) print("radians(30) : ",math.radians(30)) print("radians(180) : ",math.radians(180))# The radian value of 180 degrees is Ο€ print("180 / pi : ", end ="") print(math.radians(180 / math.pi)) The output of the above example is: radians(90) : 1.5707963267948966 radians(45) : 0.7853981633974483 radians(30) : 0.5235987755982988 radians(180) : 3.141592653589793180 / pi : 1.0 [![Image 4: Python3 Numbers](#) Python3 Numbers](#)
← Python3 Func Number RadiansPython3 Func Number Tan β†’