用户:AndrewZXHq查看:0 回复:1 评论:0 创建时间:2022-11-18T18:52:25
【作品展示】

【作品介绍】
运行后出现任何问题,作者概不负责
【作品源代码】
import tkinter as tk
import random
import threading
import time
def dow():
window = tk.Tk()
width = window.winfo_screenwidth()
height = window.winfo_screenheight()
a = random.randrange(0, width)
b = random.randrange(0, height)
window.title('警告')
window.geometry("380x80" + "+" + str(a) + "+" + str(b))
tk.Label(window,
text='检测到未知病毒',
bg='red',
font=('楷体', 16),
width=60, height=4
).pack()
window.mainloop()
threads = []
for i in range(10): #数字可以修改
t = threading.Thread(target=dow)
threads.append(t)
time.sleep(0.1)
threads[i].start()
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn