python 取整函数
2019-06-03 16:10
246 查看
import math num = 11.4 print(math.ceil(num)) # 12 向上取整 print(math.floor(num)) # 11 向下取整 print(round(num)) # 11 四舍五入
相关文章推荐
- python的取整函数ceil,floor,round
- python中单双斜杠,与几种取整函数
- python的取整函数:向上取整,向下取整,四舍五入取整
- python类型转换
- 字符串的方法及注释/ 字符串格式化符号含义及转义字符含义(python)
- python模块之re正则表达式详解
- 1。Python的介绍(记录学习Python)
- 使用python landport库快速实现排行榜
- Python 【精】AttributeError: 'Module' object has no attribute 'STARTF_USESHOWINDOW'
- python 介绍
- 超详细的Python实现百度云盘模拟登陆(模拟登陆进阶)
- python利用SVM做手写体识别
- compile vim with python
- Python探索记(14)——字符串、列表、元组、字典与运算符相关的操作
- Python 希尔排序
- 【python】pickle模块(泡菜)
- Python正则表达式指南
- Python之字符串
- python中包的使用总结
- Python之dict(或对象)与json之间的互相转化