-
Notifications
You must be signed in to change notification settings - Fork 500
Expand file tree
/
Copy pathtest_typing_speed.py
More file actions
39 lines (31 loc) · 1007 Bytes
/
test_typing_speed.py
File metadata and controls
39 lines (31 loc) · 1007 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Python Script to test your Typing Speed
from time import time
print()
print("NO NEW LINE IS THERE, WRITE CONTINUOUSLY(just SPACES)")
s = (
"this is a simple paragraph that is meant to be nice and"
" easy to type which is why there will be no commas no periods "
"or any capital letters so i guess this means that it cannot really "
"be considered a paragraph but just a series of sentences"
)
words = len(s.split())
print()
print(s)
print("\nAfter you are done press enter to know your time and speed")
input("\nPress any key to Start:")
try:
print("\nTimer Started\n")
start = time()
t = input()
end = time()
if t == s:
total = round(end - start, 2)
print("\nVoila you typed that correctly")
print("Your time was %s seconds" % total)
total = int(total) / 60
print("Speed was %s wpm" % (str(words // total)))
else:
print("\nWrongly entered")
print("Try again")
except KeyboardInterrupt:
print("")