jeudi 10 février 2022

How do you guys think of the pseudo number generator that I have coded?

feel free to let me know how do you guys think of this PNRG code, any input will be taken in.

import uuid


#uuid.uuid4()
listOfElems = [NONE]*0;
compareListOfElems = set(listOfElems)
attempt = 100000000000000000000000

def genRandom():
  a = uuid.uuid4()
  return a
  

def calculate():
  for x in range(attempt):
    listOfElems.append(uuid.uuid4())
    print(int(listOfElems[x]))

listOfElems1 = [1,2,1];
compareListOfElems1 = set(listOfElems1)

if (len(listOfElems) != len(compareListOfElems)):
  print("duplicated number found")  
else:
  print("all good")

calculate()

Just wanna know how do you guys think of it, any flaws or etc?

Thanks.




Aucun commentaire:

Enregistrer un commentaire