9628| 12
|
[项目分享] python坑人小程序~~ |
import tkinter as tk import random import threading import time s = ['你娶不到老婆!!!','你是一个大傻子!!!','你好像一只狗!!!','打不到我吧?气不气???','看这里!!!'] def boom(): window = tk.Tk() width = window.winfo_screenwidth() height = window.winfo_screenheight() a = random.randrange(100, width) b = random.randrange(100, height) window.title('Hello!骚年!!!') window.geometry("200x50" + "+" + str(a) + "+" + str(b)) tk.Label(window, text=s[random.randint(0,4)], bg='green', font=('宋体', 17), width=20, height=4).pack() window.mainloop() threads = [] for i in range(100): t = threading.Thread(target=boom) threads.append(t) time.sleep(0.1) threads.start() 此程序需要导入tkinter库,请windows + r 输入cmd 打开管理员界面,输入pip install tkinter就行了;或者在Mind+中直接导入 温馨小提示:此程序需要从任务栏上右键python或Mind+后关闭全部窗口才能跳出,若未能及时退出,请立即重启!!!(作者也不知道会发生什么!!!) |
本帖最后由 Ginnozhang# 于 2022-4-30 09:02 编辑 来来来,赞一个 直接点击运行,nice |
540 Bytes, 下载次数: 5868
© 2013-2024 Comsenz Inc. Powered by Discuz! X3.4 Licensed