我是靠谱客的博主 阳光钢笔,这篇文章主要介绍python math常用模块,现在分享给大家,希望可以做个参考。

#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2020/12/13 01:12
# @Author  : flyx
# @Site    : 
# @File    : demo3.py
# @Software: PyCharm

import math # 关于数学运算
print(id(math))
print(type(math))

print(math.pi)
print(dir(math))

print(math.pow(2,3),type(math.pow(2,3))) # 2的三次方

print(math.ceil(9.01)) # 向上取整

print(math.floor(9.99))#向下取整
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2020/12/13 01:12
# @Author  : flyx
# @Site    : 
# @File    : demo3.py
# @Software: PyCharm

import math # 关于数学运算
print(id(math))
print(type(math))

print(math.pi)
print(dir(math))

print(math.pow(2,3),type(math.pow(2,3))) # 2的三次方

print(math.ceil(9.01)) # 向上取整

print(math.floor(9.99))#向下取整

最后

以上就是阳光钢笔最近收集整理的关于python math常用模块的全部内容,更多相关python内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(66)

评论列表共有 0 条评论

立即
投稿
返回
顶部