为了账号安全,请及时绑定邮箱和手机立即绑定

python中math.pi()是什么意思?

python中math.pi()是什么意思?

陪伴而非守候 2019-02-08 11:07:47
python中math.pi()是什么意思
查看完整描述

2 回答

?
杨__羊羊

TA贡献1943条经验 获得超7个赞

就是圆周率数值
用于数学计算
死记硬背个圆周率 不是程序员的作风~
以下是用法
>>> import math
>>> math.pi
3.141592653589793
>>>

查看完整回答
反对 回复 2019-03-04
?
眼眸繁星

TA贡献1873条经验 获得超9个赞

Python 2.7.2+ (default, Oct 4 2011, 20:03:08)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import math
>>> math.pi()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'float' object is not callable
>>> math.pi
3.141592653589793
>>>



查看完整回答
反对 回复 2019-03-04
  • 2 回答
  • 0 关注
  • 6335 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信