mardi 10 mars 2020

How to generate the seed value for a particular choice in a sequence

I have a list of these integers

List = [10, 20, 30, 40, 50 ,60, 70, 80, 90, 100]

How do I generate a seed value (a) to use with the Random.seed(a) module to get a particular result ( the number 70 in this case)? I want to call the random.choice funcrion while passing the list argument. i.e random.choice(list). I need to set my seed to a particular value to get a result of 70. And can I use seed values to generate particular results in non integer type lists, if so how?




Aucun commentaire:

Enregistrer un commentaire