How to define the tangent function in python?

0

I would like someone to help me define the tangent function using python with constraints on points where the function does not exist (pi / 2 + k * pi (k integer).     

asked by anonymous 15.04.2018 / 16:08

1 answer

0

Use the math library. It has a command called math.tan(x) , in which it returns the arc tangent of x to radians.

Example:

import math

math.tan(30)

>>> -6.40533119665 
    
16.04.2018 / 16:51