How to define the tangent function in python?

Asked

Viewed 2,140 times

0

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

  • And what exactly is your doubt or difficulty? Have you studied about the module math?

  • You also put the tags [tag:matplotlib] and [tag:Graphics]. You want to plot the graph of the tangent with the limits or just use the values?

1 answer

0


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

Example:

import math

math.tan(30)

>>> -6.40533119665 

Browser other questions tagged

You are not signed in. Login or sign up in order to post.