Advertisement
JuicyJuice1100

Untitled

Feb 13th, 2017
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.36 KB | None | 0 0
  1. sample_list = []
  2. for i in range(50):
  3.     c = random.randrange(0, 15)
  4.     n = 0.4 * c - 0.8
  5.     if n < 0:
  6.         n = 0
  7.     n = round(n, 2)
  8.     pairs_list = [c, n]
  9.     sample_list.append(pairs_list)
  10.     new_list = []
  11.     epsilon = int(random.normalvariate(0, 1))
  12.     n_e = n + epsilon
  13.     sim_list = [c, n_e]
  14.     new_list.append(sim_list)
  15.    
  16. sample_list
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement