PythonNumbermath.cos

Returns the cosine of x (in radians).

문법

math.cos(x)

예제

아래 값을 입력하면 예제에 즉시 반영됩니다.

import
math
print
import math
print(math.cos(0))         # 1.0
print(math.cos(math.pi))   # -1.0