Python | sympy.cot () method

Python Methods and Functions

Using the sympy.cot() method, we can find the cot theta value using the sympy.cot () function.

Syntax: sympy.cot ()
Return: Return value of cot theta.

Example # 1:
In this example we can see that with sympy.cot () we can find the value of cot theta .

# import sympy

from sympy import *

  
# Use the sympy.cot () method

gfg = simplify (cot (pi / 3 ))

 

print (gfg)

Output:

sqrt (3) / 3

Example # 2:

# import sympy

from sympy import *

 
# Use the sympy.cot () method

gfg = simplify (cot (pi / 4 ))

 

print  (gfg)

Output:

1





Get Solution for free from DataCamp guru