Fonctions mathématiques en Python | Ensemble 3 (fonctions trigonométriques et angulaires)

Certaines des fonctions mathématiques sont discutées dans les ensembles 1 et 2 ci-dessous. Fonctions mathématiques en Python | Ensemble 1 (fonctions numériques) Fonctions mathématiques en Python | Ensemble 2 (fonctions logarithmiques et puissance) Les fonctions trigonométriques et angulaires sont abordées dans cet article. 1. péché() :- Cette fonction renvoie le la leur de valeur passée en argument. La valeur transmise dans cette fonction doit être dans radians . 2.cos() :- Cette fonction renvoie le cosinus de valeur passée en argument. La valeur transmise dans cette fonction doit être dans radians . Python
   # Python code to demonstrate the working of   # sin() and cos()   # importing 'math' for mathematical operations   import   math   a   =   math  .  pi  /  6   # returning the value of sine of pi/6   print   (  'The value of sine of pi/6 is : '     end  =  ''  )   print   (  math  .  sin  (  a  ))   # returning the value of cosine of pi/6   print   (  'The value of cosine of pi/6 is : '     end  =  ''  )   print   (  math  .  cos  (  a  ))   
Output:
The value of sine of pi/6 is : 0.49999999999999994 The value of cosine of pi/6 is : 0.8660254037844387  

3. bronzage() :- Cette fonction renvoie le tangente de valeur passée en argument. La valeur transmise dans cette fonction doit être dans radians . 4. hypot(a b) :- Cela renvoie le hypoténuse des valeurs passées en arguments. Numériquement, il renvoie la valeur de carré (a*a + b*b) . Python
   # Python code to demonstrate the working of   # tan() and hypot()   # importing 'math' for mathematical operations   import   math   a   =   math  .  pi  /  6   b   =   3   c   =   4   # returning the value of tangent of pi/6   print   (  'The value of tangent of pi/6 is : '     end  =  ''  )   print   (  math  .  tan  (  a  ))   # returning the value of hypotenuse of 3 and 4   print   (  'The value of hypotenuse of 3 and 4 is : '     end  =  ''  )   print   (  math  .  hypot  (  b    c  ))   
Output:
The value of tangent of pi/6 is : 0.5773502691896257 The value of hypotenuse of 3 and 4 is : 5.0  

5. degrés() :- Cette fonction est utilisée pour convertir la valeur de l'argument de radians en degrés . 6. radians() :- Cette fonction est utilisée pour convertir la valeur de l'argument de degrés en radians . Python
   # Python code to demonstrate the working of   # degrees() and radians()   # importing 'math' for mathematical operations   import   math   a   =   math  .  pi  /  6   b   =   30   # returning the converted value from radians to degrees   print   (  'The converted value from radians to degrees is : '     end  =  ''  )   print   (  math  .  degrees  (  a  ))   # returning the converted value from degrees to radians   print   (  'The converted value from degrees to radians is : '     end  =  ''  )   print   (  math  .  radians  (  b  ))   
Output:
The converted value from radians to degrees is : 29.999999999999996 The converted value from degrees to radians is : 0.5235987755982988