
Lv.1
只是喜欢Python而已……徒弟:程序侯
签名:只是喜欢Python而已…… 徒弟:程序侯
在 【Python作品分享】秒表V1.0【作品秀】 中回复
import time,os
秒 = 0
分 = 0
时 = 0
天 = 0
年 = 0
生 = 0
while 1:
print(int(生 + 3.975e-10), '生')
生 += 3.975e-10
print(int(年 + 3.18e-8), '年')
年 += 3.18e-8
print(int(天 + 0.000012), '天')
天 += 0.000012
print(int(时 + 0.000277), '时')
时 += 0.000277
print(int(分 + 0.0167), '分')
分 += 0.0167
print(int(秒 + 1), '秒')
秒 += 1
print('')
time.sleep(1)
os.system("cls")
改进
2020-07-01T06:58:12 点赞:0