Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #2.11
- import random
- import numpy as np
- import matplotlib.pyplot as plt
- omegaLUL = ['1']*2+['0']*6+["2"]*4
- n,m = 0,0
- N = 10000
- rept=[i for i in range(0,N,100)] #y
- x=[] #x
- rept.remove(0)
- for i in range(N):
- for j in range(12):
- random.shuffle(omegaLUL)
- for k in range(11):
- if omegaLUL[k] == '1':
- if omegaLUL[k+1] == '1' :
- n+=1
- if i in rept:
- x.append(n/i)
- print(n/N)
- print(x)
- print(rept)
- fig = plt.figure()
- plt.plot(rept, x)
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment