学习:round()函数

小数转换二进制时无法精确去转换

round()函数时用来保留制定的小数位

a=15.3
b=3
c=a/b
print(round(c,2))

 

posted @ 2022-07-28 13:25  测试小潘  阅读(83)  评论(0)    收藏  举报