031倒计时工具

一、

cat countDown.py

#! /usr/bin/env python3.8.5
# -*- coding: utf-8 -*-
import time
import tkinter.messagebox
def countdown(m):
    try:
        m = int(m)
    except ValueError:
        print("Must be an integer!")
    else:
        while True:
            for minute in range(m, -1, -1):
                if minute == 0:
                    break
                for second in range(59, -1, -1):
                    time.sleep(1)
                    print("{}:{}".format(minute-1, second))
            break
if __name__ == '__main__':
    countdown(86)
    tkinter.messagebox.showinfo("arun","该切录屏啦!!!")

  

上一篇:C#表白工具(稍有些无赖)


下一篇:基于C#的winform程序之登录系统