This question already has an answer here:
- How to randomly select an item from a list? 12 answers
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