SHARE
TWEET

Untitled

a guest Sep 19th, 2019 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from time import sleep
  2. from random import randrange
  3.  
  4. print("Every millisecond, you have a 1 in a million chance of the program printing \"Hello World\"")
  5. print("How long will it take you?")
  6. input("Press ENTER to continue.")
  7.  
  8. number = 0
  9.  
  10. while True:
  11.     x = randrange(0, 1000000)
  12.     if x != 0:
  13.         print(number, end="\r")
  14.         number += 1
  15.         sleep(0.001)
  16.     else:
  17.         break
  18. print("Hello, World!")
  19.  
  20. score = 1000000 - number
  21. print("Score: " + str(score))
  22. sleep(1)
  23. print()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top