Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.36 KB | None | 0 0
  1. import random
  2. import string
  3.  
  4. choice = int(input("How many symbols?"))
  5. res = []
  6. if choice % 2 != 0:
  7.     print ('Please type even number')
  8. else:
  9.  
  10.     for i in range (int(choice/2)):
  11.  
  12.         a = random.choice(string.ascii_letters)
  13.         b =  random.randint(0,9)
  14.        
  15.  
  16.         passw = a + str(b)
  17.  
  18.         res += passw
  19.  
  20.  
  21. pasword = ''.join(res)
  22.  
  23.  
  24.  
  25. print (pasword)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement