,逗号, 发表于 2018-11-4 12:36:58

help

floor函数是取整并且是浮点数,可为什么比如3.4输出的是3而不是3.0

1005204767 发表于 2018-11-4 12:55:18

输出是浮点数啊,你搞错了吧

,逗号, 发表于 2018-11-4 19:14:48

我用的python3.7,输入type(math,floor(3.4))输出的都是int

TPZS 发表于 2018-11-5 08:34:23

好像是这样诶

塔利班 发表于 2018-11-5 08:48:49

floor(...)
floor(x)

Return the floor of x as an Integral.
This is the largest integer <= x.
页: [1]
查看完整版本: help