Typing Speed test


Tkinter Projects in Tkinter

Type speed test

Tkinter demo to use countdown timer to check typing speed of user by using threading


  1. User enters data ( type ) in a Text widget within a fixed time period.
  2. Before adding data user has to click one Start button. This button will enable the data entry and the entery widget will be disabled once time is over.
  3. One countdown timer will show the remaining time
  4. Total number of chars entered in text widget will be displayed once the time period is over.
Type the displayed random text to check your speed
import tkinter  as tk 
from tkinter import BOTH, END, LEFT
import time
import threading
my_w = tk.Tk()
my_w.geometry("400x200") 

duration=5 #duration of test 
def my_start():
    l2['text']=0 # remove previous data
    t1.config(state='normal') # enable to enter text
    t1.delete('1.0',END) # remove entered text at starting
    for i in range(duration,-1,-1):
        l1['text']=i # showing the time left
        time.sleep(1)# one second delay  
    l2['text']=len(t1.get("1.0",'end-1c')) # total length 
    t1.config(state='disabled')  # time over so disable     

l1=tk.Label(my_w)
l1.place(relx=0.4,rely=0.1)
b1=tk.Button(my_w,text='Start',
    command=lambda:threading.Thread(target=my_start).start())
#b1=tk.Button(my_w,text='Start',
#   command=lambda:my_start())          
b1.place(relx=0.2,rely=0.1)
t1=tk.Text(my_w,state='disabled',height=3,width=40)
t1.place(relx=0.1,rely=0.3) # user data entry 
l2=tk.Label(my_w,text='')
l2.place(relx=0.1,rely=0.6) # display score
my_w.mainloop()  # Keep the window open
Python Tkinter Projects
Tkinter Text Tkinter Entry How to Validate user entered data

Subscribe

* indicates required
Subscribe to plus2net

    plus2net.com



    Post your comments , suggestion , error , requirements etc here





    Python Video Tutorials
    Python SQLite Video Tutorials
    Python MySQL Video Tutorials
    Python Tkinter Video Tutorials
    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2021 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer