Home >>Python math Module >Python math.tan() Method
Python math.tan() method in python is used to return the tangent of the given number in radians and it accepts a number.
Syntax:math.tan(x)
Parameter | Description |
---|---|
x | It is required a number to find the tangent. |
import math
print (math.tan(45))
print (math.tan(-45))
print (math.tan(90))
print (math.tan(60))
import math
a = -5
print("tan(",a,") is = ", math.tan(a))
a = 0.6233
print("tan(",a,") is = ", math.tan(a))
a = 0
print("tan(",a,") is = ", math.tan(a))
a = 3
print("tan(",a,") is = ", math.tan(a))