I Don't think that this is close to true random. If You can better this code give it your best SHOT!!!
import time
from random import randint
o = float()
retry = bool()
Ver = float()
while (True):
if (retry == False):
time.sleep(2)
retry = False
millis = int(round(time.time() * 1000))
millis = str(millis)
lenth = len(millis)
m = millis[(lenth - 4):]
n=(randint(0,9999))
m=int(m)
n=int(n)
o = ((m + n)/2)+(randint(0,5))
o = round(o/1000)
if (Ver != o):
print (o)
retry = False
else: retry = True
Ver = (o)
Aucun commentaire:
Enregistrer un commentaire