- 博客(3)
- 收藏
- 关注
原创 用python实现的控制台进度条
#进度条import timefor i in range(100): time.sleep(1) print('[{}]{}%'.format('*'*i+' '*(100-i),i),end='\r')
2019-05-30 14:18:54 385
原创 python的取整函数ceil,floor,round
import mathassert math.ceil(-2.3)==-2assert math.ceil(2.3)==3assert math.floor(2.3)==2assert math.floor(-2.3)==-3assert round(1.2)==1 #round()是内置函数assert round(1.5)==2assert round(-1.2)==-1a...
2019-05-30 08:48:07 1202
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人