- tan() is python math function which determine the tangent value of number.
Syntax-
math.tan(x)
- Here x should be a numeric value.
- it return the tangent value of x in radians.
Example-
tan(0) will return 0.0
tan(45) will 1.6197751905438615
program-
import math
#these value are in radians
print("tan(90) : ",math.tan(90))
print("tan(0) : ",math.tan(0))
print("tan(45) : ",math.tan(45))
print("tan(60) : ",math.tan(60))
print("tan(10) : ",math.tan(10))
tan(90) : -1.995200412208242
tan(0) : 0.0
tan(45) : 1.6197751905438615
tan(60) : 0.320040389379563
tan(10) : 0.6483608274590866
import math
#these value are in degree
n=math.pi/180
print("tan(90) : ",math.tan(90*n))
print("tan(0) : ",math.tan(0*n))
print("tan(45) : ",math.tan(45*n))
print("tan(60) : ",math.tan(60*n))
print("tan(10) : ",math.tan(10*n))
tan(90) : 1.633123935319537e+16
tan(0) : 0.0
tan(45) : 0.9999999999999999
tan(60) : 1.7320508075688767
tan(10) : 0.17632698070846498