mardi 2 mars 2021

i am trying to define a function random in a specific range any solution here's my code

I am trying to make a random number generator and the result is none what can I do here's code

import random
#functions
def randomnumber (x , y) :
    random.randint(x , y)
#variables
r = randomnumber(1 , 5)
print (r)

and here is the result

None



Aucun commentaire:

Enregistrer un commentaire