vendredi 14 août 2020

Random module and superior operator not making sense? [closed]

import random 
print(random.random())
if random.random() > 0.7:
    print("This number is almost at 1")

sometimes, it results in this:

0.3314845045659939
This number is almost at 1

What is wrong with the code?




Aucun commentaire:

Enregistrer un commentaire