когда я вызываю значения в словаре d, я получаю такую ошибку: 'module' object is not callable
так я использую значения в d:
d = {'c1': (10,20), 'c2': (30,20), 'c3': (10,30), 'c4': (10,40)}
import math
import random
because there are two values for one key, I just need one random value of them, so I use random.choice, then I get the error:
'builtin_function_or_method' object has no attribute 'choice'
can somebody help me with this part?
time1=-random.choice(d['c1'])* math.log(1.0 - random())
time2=-random.choice(d['c2'])* math.log(1.0 - random())
time3=-random.choice(d['c3'])* math.log(1.0 - random())
time4=-random.choice(d['c4'])* math.log(1.0 - random())
Обновление: мне просто нужно изменить random () to random.random () для расчета времени1