Advertisement
Allena_Gorskaya

Programma 4

Feb 5th, 2019
339
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.49 KB | None | 0 0
  1. from random import *
  2. import string
  3. adjs = ['green', 'blue', 'yellow', 'good', 'cold']
  4. nouns = ['ball', 'panda', 'dinosaur', 'cat', 'dog']
  5.  
  6.  
  7. while True:
  8.     adj = choice(adjs)
  9.     noun = choice(nouns)
  10.     number = randint(1, 20)
  11.     special = choice(string.punctuation)
  12.  
  13.     password = adj + noun + str(number) + special
  14.  
  15.     print('Новый пароль:', password)
  16.    
  17.     ans = input('Нужен другой пароль? да/нет\n')
  18.     if ans == 'нет':
  19.         break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement