vendredi 6 avril 2018

random number selection probability

I know how to choose random numbers using the Python random library.

This will choose 5 random numbers between 0 and 20:

import random

for x in range(5):
    print random.randint(0,20)

I would like to select one number between 0 and 20, e.g. 10, and after that find the probability of the upcoming 5 numbers.




Aucun commentaire:

Enregistrer un commentaire