Just a problem I'm having and can't seem to figure out.
I have two tables: table1 and table2:
table1=[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] and
table2=[0 for i in range (21)] I want to run:
import random for d1 in range(21): table2[d1] = random.expovariate(gamma_val) But if value in table1 = 1, that position in table2 should run random.expovariate(x), and if not 1 run random.expovariate(y).