Python Basics
Python Advanced
Python Useful References
Python Useful Resources
Selected Reading
© 2011 TutorialsPoint.COM
|
Python Number radians() Function
Description:
This function converts angle x from degrees to radians.
Syntax:
Note: This function is not accessible directly so we need to import math module and then we need to call this function using math static object.
Parameters:
Here is the detail of parameters:
Return Value:
The radian value of an angle.
Example:
#!/usr/bin/python
import math
print "radians(3) : ", math.radians(3)
print "radians(-3) : ", math.radians(-3)
print "radians(0) : ", math.radians(0)
print "radians(math.pi) : ", math.radians(math.pi)
print "radians(math.pi/2) : ", math.radians(math.pi/2)
print "radians(math.pi/4) : ", math.radians(math.pi/4)
|
This will produce following result:
radians(3) : 0.0523598775598
radians(-3) : -0.0523598775598
radians(0) : 0.0
radians(math.pi) : 0.0548311355616
radians(math.pi/2) : 0.0274155677808
radians(math.pi/4) : 0.0137077838904
|
|
|
|