Advertisement
kevinbocky

input_game.py

Dec 30th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. from time import sleep, time
  2.  
  3. loop = input("How many times do you want to try your reaction skills? ")
  4. count = 0
  5.  
  6. for i in range(int(loop)):
  7. print("Attempt number " + str(count + 1))
  8. sleep(5)
  9.  
  10. start = time()
  11. print("Quick, press enter")
  12. input()
  13. print("That was fast")
  14. stop = time()
  15.  
  16. reaction_time = (stop - start)
  17. print("You took "+ str(reaction_time) + " seconds")
  18. count = count + 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement