>>> round(1.6)
2.0
>>> round(1.4)
1.0
>>> int(1.6)
1
>>> int(1.4)
1
>>> floor(1.6)
Traceback (most recent call last):
File "
", line 1, in
floor(1.6)
NameError: name 'floor' is not defined
>>> import math
>>> math.floor(4.7)
4.0
>>> math.floor(4.2)
4.0
>>>
阅读(342) | 评论(0) | 转发(0) |