0
I have to make a certain calculation with real numbers generated randomly in Pyton. In my case, there will be 10 randomly generated numbers, and after that, I need each number on my list to be entered in my formula for the calculation to be carried out. The formula is: minimum + (maximum - minimum)* x where x is every randomly generated number on my list
so far I’ve done so:
minimo = 50
maximo = 130
numrandomicos = [random.uniform(0,1) for r in range(10)]
print(numrandomicos)
Am I already looped? If so, just make a loop that runs through your list applying the desired formula on each value.
– Woss
I used a loop with for, it looked like this: for numero in numrandomicos: numeros = minimo+(maximo-minimo)*numrandomicos print(numeros)
– Rômulo Pinheiro
And that’s not what you need to do?
– Woss