Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to use cos in python

import math

a = math.pi / 6

b = math.radians(30)

print(math.cos(a))
#Output: 0.8660254037844387

print(math.cos(b))
#Output: 0.8660254037844387
 
PREVIOUS NEXT
Tagged: #python
ADD COMMENT
Topic
Name
2+7 =