当前位置:首页 / 文章测试 / 用Python写少羽nb四个字

用Python写少羽nb四个字

开始打字练习

一个<>按一次Tab键,两个<>按两次Tab键

import tkinter as tk

import random

def show_warm_tip():

<>window = tk.Toplevel()

<>window.attributes('-topmost', False)

<>window.attributes('-alpha', 0.9)

<>screen_width = window.winfo_screenwidth()

<>screen_height = window.winfo_screenheight()

<>window_width = 250

<>window_height = 60

<>x = random.randrange(0, screen_width - window_width)

<>y = random.randrange(0, screen_height - window_height)

<>window.title('synb')

<>window.geometry(f"{window_width}x{window_height}+{x}+{y}")

<>tips = ['少羽牛逼' ]

<>tip = random.choice(tips)

<>bg_colors = ['lightpink', 'skyblue', 'lightgreen', 'lavender']

<>bg = random.choice(bg_colors)

<>label = tk.Label(

<><>window,

<><>text=tip,

<><>bg=bg,

<><>font=('微软雅黑', 16),

<><>width=30,

<><>height=3,

<><>justify=tk.CENTER)

<>label.pack()

<>window.after(10, show_warm_tip)

if __name__ == "__main__":

<>root = tk.Tk()

<>root.withdraw()

<>show_warm_tip()

<>root.mainloop()

声明:以上文章均为用户自行发布,仅供打字交流使用,不代表本站观点,本站不承担任何法律责任,特此声明!如果有侵犯到您的权利,请及时联系我们删除。

本文打字速度TOP10

  • 暂无打字数据!