【发布时间】:2012-04-03 18:35:02
【问题描述】:
给定以下整数和计算
from __future__ import division
a = 23
b = 45
c = 16
round((a/b)*0.9*c)
这会导致:
TypeError: 'int' object is not callable.
如何将输出四舍五入为整数?
【问题讨论】:
-
在 Python 2.7 和 2.4 下运行良好。
-
我认为您的问题不在显示的代码中。
-
2.7,不知道使用名为 round 的 int 存在问题。
标签: python python-2.7