Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from random import choice
- omega = [('g','r')]*12 + [('g','g')]*3
- n, N, m = 0, 1000000, 0
- for i in range(N):
- z = choice(omega)
- a = False
- for i in range(6):
- if choice(z) == 'r':
- a = False
- break
- a = True
- if a == True:
- m+=1
- if a == True and z == ('g','g'):
- n+=1
- print(n/m)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement