python如何向上取整
1、1. 导入包 math
2. 函数 ceil 为向上取整 floor 为向下取整
通过 math.ceil() 来调用函数,看下图

2、math包还有很多其他数学函数,具体看文档 https://docs.python.org/zh-cn/3/library/math.html?highlight=math#module-math
阅读量:138
阅读量:45
阅读量:180
阅读量:167
阅读量:87
1、1. 导入包 math
2. 函数 ceil 为向上取整 floor 为向下取整
通过 math.ceil() 来调用函数,看下图

2、math包还有很多其他数学函数,具体看文档 https://docs.python.org/zh-cn/3/library/math.html?highlight=math#module-math