-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path2_password_picker.py
43 lines (33 loc) · 1.52 KB
/
2_password_picker.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
34
35
36
37
38
39
40
41
42
43
import random
import string
adjectives = ['sleepy', 'slow', 'smelly','wet', 'fat', 'red','orange', 'yellow', 'green''blue', 'purple', 'fluffy','white', 'proud', 'brave']
nouns = ['apple', 'dinosaur', 'ball', 'toaster', 'goat', 'dragon', 'hammer', 'duck', 'panda','telephone', 'banana', 'teacher']
# print('Welcome to Password Picker!')
# adjective = random.choice(adjectives)
# noun = random.choice(nouns)
# number = random.randrange(1,100)
# special_char = random.choice(string.punctuation)
# password = adjective + noun + str(number) + special_char
# print('Your new password is: %s' % password)
# 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
while True:
for num in range(3):
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 more passwords? Type y or n: ')
if response == 'n':
break