vendredi 12 juillet 2019

How to pick a random number from several? [duplicate]

This question already has an answer here:

import random  
def random_lettre(num1,num2,num3,num4):  
    i = random.randrange(num1,num2,num3,num4)  
    print(i)

random_lettre(55 ,23 ,100, 10523)

I expect the output of this code to be 55 or 23 or 100 or 10523,but he get out type error

how to do a random number Specifically random.randrange(a,b,c)




Aucun commentaire:

Enregistrer un commentaire