SHARE
TWEET

Untitled

a guest Jul 14th, 2017 131 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from random import uniform as rand
  2.  
  3. def rand_sum(seq_A, seq_B):
  4.     return sum([rand(i, j) for i, j in zip(seq_A, seq_B)])
  5.  
  6.  
  7. def clev (R, G, MAXVAL = 100000):
  8.     return sum([int(R() < G()) for i in range(MAXVAL)])
  9.  
  10.  
  11. def get_rand_func(a, b):
  12.     def res():
  13.         return rand(a, b)
  14.     return res
  15.  
  16.  
  17. print (clev (get_rand_func(1, 10), get_rand_func(8, 12)))
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
 
Top