Advertisement
here2share

# function_like_random.py

Jul 22nd, 2017
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.36 KB | None | 0 0
  1. # function_like_random.py -- impractical fun
  2.  
  3. import time
  4.  
  5. def rnd(min=0,max=0):
  6.     if not max:
  7.         max=min
  8.         min=0
  9.     elif min<max:
  10.         max-=min
  11.     t=int(int(''.join([str(time.clock())[6:] for z in 'x'*6]))*time.clock())
  12.     x=t%(max+1)+min
  13.     return x
  14.  
  15. print('***')
  16. print
  17.  
  18. for z in 'z'*50 :
  19.     print(rnd(80, 100))
  20.     print
  21.  
  22. for z in 'z'*30 :
  23.     print(rnd(int('9'*16)))
  24.     print
  25.  
  26. for z in 'z'*80 :
  27.     print(min([rnd(5000) for z in 'x'*9]))
  28.     print
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement