Wednesday, July 3, 2024
HomeLanguagesPythonPython | sympy.sec() method

Python | sympy.sec() method

With the help of sympy.sec() method, we are able to find the value of sec theta using sympy.sec() function.

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

Example #1 :
In this example we can see that by using sympy.sec() method, we can find the value of sec theta.




# import sympy
from sympy import *
  
# Use sympy.sec() method
gfg = simplify(sec(pi / 6))
    
print(gfg)


Output :

2*sqrt(3)/3

Example #2 :




# import sympy
from sympy import *
  
# Use sympy.sec() method
gfg = simplify(sec(pi / 3))
    
print(gfg)


Output :

2

Calisto Chipfumbu
Calisto Chipfumbuhttp://cchipfumbu@gmail.com
I have 5 years' worth of experience in the IT industry, primarily focused on Linux and Database administration. In those years, apart from learning significant technical knowledge, I also became comfortable working in a professional team and adapting to my environment, as I switched through 3 roles in that time.
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments