DEV Community

Yasin Aktimur
Yasin Aktimur

Posted on

ETR tests

import random

perfecttiming = []
totalrty = 0
for luckynumber in range(0,1000000):
    nonce = random.randint(10000000, 10000000000)  # 10 milyon ile 10 milyar arasında rastgele sayı üretir.
    y = nonce % 5760
    if y == 0:
        perfecttiming.append(totalrty)
        totalrty = 0
        continue
    else:
        totalrty = totalrty + 1
        continue

print("perfecttiming: ", perfecttiming)
print("perfecttiming len: ",len(perfecttiming))
a = 0
for i in perfecttiming:
    a = a + i

print(a/len(perfecttiming))

Top comments (0)