This question already has an answer here:
- Generate password in python 7 answers
i am trying to make a simple password program. however i don't know how to generate more than 1 random number.
import random
number = random.randint(1,9)
print(number * 4 )
now this would return whatever 1 number that was picked multiplied by 4 (e.g number picked = 5, the return would be 20)
another thing i tried (while extremely tedious) is printing the random number + random number
essentially what i want to do is make a 4 digit code e.g 3892
Aucun commentaire:
Enregistrer un commentaire