forked from falnicdav/learning_python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpassword_picker (2).py
33 lines (23 loc) · 930 Bytes
/
password_picker (2).py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import random
import string
adjectives = ['loyal', 'loud', 'teeny',
'cute', 'crazy', 'tired',
'floofy', 'cloudy', 'sweet',
'intelligent', 'dangerous', 'fruitful',
'turquoise', 'silver', 'leafy']
nouns = ['snake', 'skywing', 'cat',
'battery', 'cactus', 'leather',
'book', 'hackysack', 'falcon',
'charm', 'sky', 'zebra',
'Nezuko', 'Kagome', 'Ochaco', 'Asuna']
print('Welcome to Password Picker!')
while True:
adjective = random.choice(adjectives)
noun = random.choice(nouns)
number = random.randrange(0, 100)
special_char = random.choice(string.punctuation)
password = adjective + noun + str(number) + special_char
print('Your new password is: %s' % password)
response = input('Would you like another password? Type y or n: ')
if response == 'n':
break