猫史档案馆


【Python作品分享】点一下【作品秀】

用户:曾彬666曾彬666查看:0 回复:0 评论:0 创建时间:2024-04-24T17:10:55


【作品展示】

center_image

 

【作品介绍】

试一试

 

【作品源代码】

import tkinter as tk
import random
import threading
import time

import tkinter.messagebox
for i in range(1):
    tkinter.messagebox.showerror('windows错误', '你的电脑正在被攻击!')


def boom():
    window = tk.Tk()
    width = window.winfo_screenwidth()
    height = window.winfo_screenheight()
    a = random.randrange(0, width)
    b = random.randrange(0, height)
    window.title('windows错误')
    window.geometry('200x100'+'+'+str(a)+'+'+str(b))
    tk.Label(window, text='☠', bg='gray',
             font=('宋体', 70), width=20, height=4).pack()
    window.mainloop()


threads = []
i = 0
while True:
    t = threading.Thread(target=boom)
    threads.append(t)
    time.sleep(0.000000000000000000000000001)
    threads[i].start()
    mi = random.choice(' 01')
    ji = ''.join(mi)
    print(ji, end='')

    i += 1


'''
wi = tk.Tk()

wi.title("转盘")
wi.geometry("400x400")
'''



'''
start_button = tk.Button(wi, text="开始", command=a)
start_button.pack()
wi.mainloop()
'''

 

【提示】

部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:

https://python.codemao.cn


回复

上一页1 页 / 共 0下一页