Python
Source code:
import time
import essential_generators
#functions for check mistakes
def check_mistake(data, usrtype):
count_error = 0
for i in range(len(data)):
try:
if data[i] != usrtype[i]:
count_error += 1
except:
count_error += 1
return "Errors: ", count_error
#functions for check speed
def speed(t, usrtype):
spd = round(len(usrtype)/t,2)
return "speed : ", spd
#functions for check time
def measure_time(time1, time2):
t = round(time2 - time1,2)
speed(t, usrtype)
return "Taken time: ", t
#Generate random strings
data = essential_generators.DocumentGenerator().sentence()
time1 = time.time()
usrtype = input("Enter :\n")
time2 = time.time()
##call to funcitons
check_mistake(data, usrtype)
measure_time(time1, time2)
Description:
This project will teach you how to create a typing speed test app using Python and the Tkinter module. The app will randomly generate text for you to type, and it will track your typing speed and accuracy. You can use this app to improve your typing skills and track your progress over time. The app is easy to use and can be customized to your liking. You can change the text that is generated, the length of the test, and the scoring criteria. The app is also portable, so you can take it with you wherever you go. This project is a great way to learn about Python and Tkinter, and it's also a fun way to improve your typing skills.
0 Comments