Ada95
0
Q:

how to use sin and cos in 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)) 
0

New to Communities?

Join the community