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

【作品介绍】
你还在为单身而忧虑吗?你还在为单身而烦恼吗?
单身狗教你如何用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
BUG传说这程序打开了关不掉~~imgsrc="http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/24/sweata_thumb.gif"alt="emotion_汗"
点赞0
评论