Guest User

Untitled

a guest
May 20th, 2017
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. import random
  2.  
  3. pass1 = "QWERTYUIOPASDFGHJKLZXCVBNM"
  4. pass2 = "1234567890"
  5. pass3 = "qwertyuiopasdfghjklzxcvbnm"
  6. pass4 = "~!@#$%&*_+|\<>?-=\;/"
  7. Y="Yes"
  8. y ="Yes"
  9. N = "No"
  10. x = raw_input("Do you want a random password? Y or N")
  11. if x == 'Y' or x == "y":
  12. random1 = random.sample(pass1, 3)
  13. random2 = random.sample(pass2, 3)
  14. random3 = random.sample(pass3, 3)
  15. random4 = random.sample(pass4, 3)
  16.  
  17. randomValue = random1 + random2 + random3 + random4
  18. random.shuffle(randomValue)
  19. password = "".join(randomValue)
  20.  
  21. print password
  22.  
  23.  
  24. else:
  25. print ("Program closed")
Add Comment
Please, Sign In to add comment