Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

Generate random numbers with known occurence possibilities

$
0
0
Hallo!

I would like to generate random triads of numbers (h, v, d).

The d number is generated according to the generated values of h, v following some if statements

h and v are integers within a known interval

For example if h=1 and v=2 ... d can take the value 1 (with possibility 83.3%) or 2 (6.7 %) or 3 (10 % possibility).

How can I declare these possibilities in Python???

Viewing all articles
Browse latest Browse all 2485

Trending Articles