1 import time 2 count = 0 3 a = input('time:') 4 b = int(a) * 60 5 while (count < b): 6 ncount = b - count 7 print('%dS'%ncount) 8 time.sleep(1) 9 count += 1 10 print('done')
python数字倒计时
1 import time 2 count = 0 3 a = input('time:') 4 b = int(a) * 60 5 while (count < b): 6 ncount = b - count 7 print('%dS'%ncount) 8 time.sleep(1) 9 count += 1 10 print('done')
python数字倒计时
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。