Python math.tan() Method
Example
Find the tangent of different numbers (angles):
# Import math Library
import math
# Return the tangent of
different numbers
print (math.tan(90))
print (math.tan(-90))
print
(math.tan(45))
print
(math.tan(60))
Try it Yourself »
Definition and Usage
The math.tan()
method returns the tangent of a number.
Syntax
math.tan(x)
Parameter Values
Parameter | Description |
---|---|
x | Required. A number to find the tangent of. If the value is not a number, it returns a TypeError |
Technical Details
Return Value: | A float value, representing the tangent of a number |
---|---|
Python Version: | 1.4 |
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.