Python | Typing Test

/ 11 Aug 2013 /
This is the coolest thing ever ok.




from time import time

q = input('What do you want to type? ')
a = ' '
record = []
while a != '':
    start = time()
    a = input('Type: ')
    end = time()
    v = end-start
    record.append(v)
    if a == q:
        print('Time taken to type chosen word: {:.2f}'.format(v))
    else:
        break
record = record[:-1]
print('Your Highschore is: {:.2f} seconds.'.format(min(record)))
 
Copyright © 2010 M(ath)+me, All rights reserved