效果图:
代码:
# -*- 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&#