mardi 1 mars 2016

randomly pick an element from a list in python using pseudo random generator which should happen 50 percent of time

I have a list which has certain elements.For example event=["head","tail"].Each element should be picked randomly using pseudo random generator.This random event should occur roughly 50 percent of time.Use some sort of pseudo random number generator, but make this in a way that we can repeat the test or the sequence that way if something in the test fails, we can repeat what happened.This should be implemented in python




Aucun commentaire:

Enregistrer un commentaire