Python/ref math cos
来自菜鸟教程
<languages />
Python 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))
定义和用法
The
math.cos()
方法返回数字的余弦值。
句法
math.cos(x)
参数值
| 参数 | 描述 |
|---|---|
| x | 需要。查找余弦的数字。如果该值不是数字,则返回TypeError |
技术细节
| 返回值: | A
|
| Python版本: | 1.4 |