import tkinter as tk
import random as ra
import threading as td
import time as ti
def Love():
root=tk.Tk()
width=200
height=50
screenwidth=root.winfo_screenwidth()
screenheight=root.winfo_screenheight()
x=ra.randint(0,screenwidth)
y=ra.randint(0,screenheight)
root.title("❤")
root.geometry("%dx%d+%d+%d"%(width,height,x,y))
tk.Label(root,text='I LOVE YOU!',fg='white',bg='pink',font=("Comic Sans MS",15),width=30,height=5).pack()
root.mainloop()
def Heart():
root=tk.Tk()
screenwidth=root.winfo_screenwidth()
screenheight=root.winfo_screenheight()
width=600
height=400
x=(screenwidth-width)//2
y=(screenheight-height)//2
root.title("❤")
root.geometry("%dx%d+%d+%d"%(screenwidth,screenheight,0,0))
tk.Label(root,text='❤',fg='pink',bg='white',font=("Comic Sans MS",500),width=300,height=20).pack()
root.mainloop()
t=td.Thread(target=Heart)
t.start()
for i in range(30):
t=td.Thread(target=Love)
ti.sleep(0.1)
t.start()
没有合适的资源?快使用搜索试试~ 我知道了~
python表白代码直接用
共4个文件
txt:1个
png:1个
mp4:1个
2 下载量 27 浏览量
2023-10-09
11:07:46
上传
评论
收藏 1.52MB RAR 举报
温馨提示
python表白代码非常实用的满屏表白代码
资源推荐
资源详情
资源评论
收起资源包目录
表白代码.rar (4个子文件)
表白代码
满屏表白.png 169KB
满屏表白.gif 867KB
满屏表白代码.txt 1KB
满屏表白.mp4 979KB
共 4 条
- 1
资源评论
Want595
- 粉丝: 7w+
- 资源: 71
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功