mercredi 31 mai 2017

Proving that random() will never return 0 or 1

In the python language the random() function is known to never return 0 or 1. My question is how would somebody create a function to prove this fact. In the function I would like to record the amount of trials run and the amount of times that a 0 or a 1 has occurred ( which we know should be 0).

This is a problem in a book I am reading and I cant figure out the solution.




Aucun commentaire:

Enregistrer un commentaire