SHARE
TWEET

Untitled

a guest Sep 17th, 2019 89 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import random
  2. omega = ['w','w','w','w','w','w','w','w','m','m','m','m','m','m','m','m','m']
  3. n,m = 0,0
  4. N = 10000
  5. for i in range(N):
  6.     a = []
  7.     for i in range(7):
  8.         a += [random.choice(omega)]
  9.     if a.count('w') == 4:
  10.         n+=1
  11. print(n/N)
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