猫史档案馆


【Python作品分享】表白弹窗【作品秀】

用户:我是菜鸟2我是菜鸟2查看:5 回复:5 评论:5 创建时间:2022-02-19T21:55:05


【作品展示】

center_image

 

【作品介绍】

你还在为单身而忧虑吗?

你还在为单身而烦恼吗?

单身狗教你如何用python争夺喵的芳心(滑稽)

 

【作品源代码】

import tkinter as tk
import random
import time
import threading


def boom():
    window = tk.Tk()
    width = window.winfo_screenwidth()
    height = window.winfo_screenwidth()
    a = random.randrange(0,width)
    b = random.randrange(0,height)
    window.title('喵你,我不爱你我就是小狗')
    window.geometry("400x100"+"+"+str(a)+"+"+str(b))
    tk.Label(window,text="做我女朋友吧",bg='pink',font=("宋体",30),width=20,height=4).pack()
    #循环显示
    window.mainloop()

threads = []
for i in range(5200):
    t = threading.Thread(target=boom)
    threads.append(t)
    time.sleep(0.1)
    threads[i].start()

 

【提示】

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

https://python.codemao.cn


回复

上一页1 页 / 共 1下一页
BUG传说BUG传说

这程序打开了关不掉~~imgsrc="http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/24/sweata_thumb.gif"alt="emotion_汗"

点赞0


评论


尬聊boy尬聊boy

az

点赞1


评论


testifytestify

好东西,我拿走了

点赞0


评论


我是小虾仁呀我是小虾仁呀

好活,下次不能再整了

点赞0


评论


一门鸽鸽一门鸽鸽

好东西,下次不许了

(5200线程

点赞0


评论