Alleyf / Gitalk

存储博客的评论
0 stars 0 forks source link

Python_Notes - alleyf #5

Open Alleyf opened 2 years ago

Alleyf commented 2 years ago

https://alleyf.github.io/2022/09/09/Python_Notes/#%E5%BC%82%E5%B8%B8%E5%A4%84%E7%90%86

math 模块123456789101112import mathprint(math.ceil(4.1)) #返回数字的上入整数print(math.floor(4.9)) #返回数字的下舍整数print(math.fabs(-10)) #返回数字的绝对值print(math.sqrt(9)) #返回数字的平方根print(math.exp(1)) #返回e的x次幂