mardi 14 novembre 2017

How to generate random numbers with specific probabilities in python?

For example,

try to generate a list of 1000 random numbers with only 0 and 1.

s.t.

0 has the prob of 40%

1 has the prob of 60%

thanks!




Aucun commentaire:

Enregistrer un commentaire