Tom_Jung

Untitled

Jan 17th, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. from time import sleep, time
  2. sleep(2)
  3.  
  4. count = 0
  5. score = 0
  6. start = time()
  7.  
  8. for i in range(5):
  9. print('Quick, press the enter key')
  10. input()
  11. reaction_time = time() - start
  12. score = reaction_time + 1
  13. count = count + 1
  14.  
  15. print('You took ', score , 'seconds')
  16.  
  17. print('Average reaction time is ', score / 5 , 'seconds')
Advertisement
Add Comment
Please, Sign In to add comment