Python – Find Tangent – tan() Function with Examples

tan() function is used to find the tangent of x radians in Python for the given input(x – parameter).


Syntax of tan() Function

The syntax of tan() function in Python is:


Parameters of tan() Function in Python

x – Where x is any valid python number (positive or negative). This parameter is required.
Note: If the x parameter is not a number, tan() function will return an Error.



tan() function is available and compatible with both Python 2.x and 3.x. This function is a part of python standard math library.


Return Value of tan() Function in Python

tan() function returns the tangent of x radians for the given input.


Python tan() Function Example