jeudi 6 février 2020

i want to print a right answer using random function with different probability

for example, if the right answer is "hello world", i try to find a way to modify the probability of giving it : one time on ten, two time on ten, three time on ten, etc...

the rest of the time the answer is wrong.

it could be something like : answer = "hello world" print(random(answer))

thanks for your help. PL




Aucun commentaire:

Enregistrer un commentaire