第三章课后习题 3.6-3.8

3.6 文本进度条Starting...Done!形式
import time
scale = 10
print("Starting", end="\n")
for i in range(scale+1):
    c = (i/scale)*100
    print("\r{:.0f}%".format(c), end="")
    time.sleep(1)
print("\nDone!")

 

posted @ 2025-03-29 13:12  与尔5  阅读(7)  评论(0)    收藏  举报