파이썬 math.cos() 메서드
예시
다른 숫자의 코사인 찾기:
# Import math Library
import math
# Return the cosine of
different numbers
print (math.cos(0.00))
print (math.cos(-1.23))
print (math.cos(10))
print (math.cos(3.14159265359))
정의 및 사용
이 math.cos()
메서드는 숫자의 코사인을 반환합니다.
통사론
math.cos(x)
매개변수 값
Parameter | Description |
---|---|
x | Required. A number to find the cosine of. If the value is not a number, it returns a TypeError |
기술적 세부 사항
반환 값: | float 각도의 코사인을 나타내는 -1에서 1 사이의 값 |
---|---|
파이썬 버전: | 1.4 |