Advertisement
Guest User

Untitled

a guest
Feb 12th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. GNU nano 2.4.2 File: kek.py
  2.  
  3. import math
  4. import random
  5. import time
  6.  
  7. def hue():
  8. global cislo
  9. cislo=random.randrange(0,10000)
  10. return(cislo)
  11. pokus = 0
  12.  
  13. while True:
  14. numbah = input("What number would you like to find between 0-10000? ")
  15. if(numbah > 10000):
  16. print("What number would you like to find between 0-10000? ")
  17. else:
  18. break
  19. while True:
  20. hue()
  21. pokus += 1
  22. print("Current number of tries: %d" % pokus)
  23. print(cislo)
  24. time.sleep(0.00001)
  25. if(cislo == numbah):
  26. break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement