使用Python编写打字训练小程序

本文介绍了如何使用Python编写一个打字训练小程序,并通过PyInstaller将其转换为可执行的.exe文件,以方便在Windows上运行。
摘要由CSDN通过智能技术生成

效果图:

代码:

# -*- coding: utf-8 -*-
# @Software : PyCharm
# @version  :Python 3.7.3
# @File     : type.py

from tkinter import *
import random
import string
from datetime import datetime
 
root = Tk()
root.title("Python打字练习")
v1 = StringVar()
v2 = StringVar()
v3 = StringVar()
e1 = Entry(root, text=v1, state='disabled', width=40, font=('宋体', 14))
e2 = Entry(root, textvariable=v2, width=40, font=('宋体', 14))
e3 = Label(root, textvariable=v3, width=40, font=('宋体', 10), foreground='red')
e1.grid(row=0, column=0, padx=12, pady=20)
e2.grid(row=1, column=0, padx=12, pady=20)
e3.grid(row=2, column=0, padx&#
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值