math.tan()

Returns the tangent of input numeric x, measured in radian value.

Syntax

math.tan(x)

Example 1

Use math.tan() to return the tangent of the integer 5 measured in radian value:

import math
print(math.tan(5))
# Output: -3.380515006246586

Example 2

Use math.tan() to return the tangent of the float 5.5 measured in radian value:

import math
print(math.tan(5.5))
# Output: -0.995584052213885

Contributors

Interested in helping build Docs? Read the Contribution Guide or share your thoughts in this feedback form.

Learn Python on Codecademy

Contributors