- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypingspeed.py
More file actions
Latest commit
32 lines (26 loc) · 871 Bytes
/
Copy pathtypingspeed.py
File metadata and controls
32 lines (26 loc) · 871 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
fromtimeimporttime
print("\nType the sentence given below")
s="The Quick Brown Fox Jumps over the lazy dog."
words= (len(s.split()))
print()
print(s)
print("\nAfter you are done press enter to know your time and speed")
input("Press any key to Start:")
whileTrue:
print("\nTimer Started\n")
start=time()
t=input()
end=time()
ift==s:
total=round(end-start, 2)
print("\nHurray you typed that correctly")
print("Your time was %s seconds"%total)
total=int(total) /60
print("Speed was %s WPM"% (str(words//total)))
break
else:
print("\nWrongly entered - Enter the sentence as it is shown\n")
user_input=input("Press Enter to Play Again\n")
print("\nType the sentence given below")
print(s,"\n")
input("Press any key to Start:")