Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created January 17, 2021 17:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amankharwal/479eed92741fbf8b921dba9b670da51d to your computer and use it in GitHub Desktop.
Save amankharwal/479eed92741fbf8b921dba9b670da51d to your computer and use it in GitHub Desktop.
import random
import string
print("Welcome to Password Picker")
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']
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("You Password is : %s" % password)
response = input("Would you like another password? Type Y or N: ")
if response == 'N':
break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment