dimanche 7 juin 2020

Random modul with range function

Can someone explain me why the function random.random works within a for loop while the function random.randint does not?

import random as random

for x in range(3):
    print(random.random())
#result : OK

import random as random

for x in range(3):
    print(random.randint())
#result : NOK




Aucun commentaire:

Enregistrer un commentaire