Related Articles

Related Articles

Python | sympy.sec() method
  • Last Updated : 02 Aug, 2019

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.

filter_none

edit
close

play_arrow

link
brightness_4
code

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

chevron_right


Output :

2*sqrt(3)/3



Example #2 :

filter_none

edit
close

play_arrow

link
brightness_4
code

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

chevron_right


Output :

2

Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.

To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.

My Personal Notes arrow_drop_up
Recommended Articles
Page :