-
Notifications
You must be signed in to change notification settings - Fork 12.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
170abcf
commit 4f65a3c
Showing
1 changed file
with
125 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
# PasswordGenerator GGearing 314 01/10/19 | ||
# modified Prince Gangurde 4/4/2020 | ||
|
||
from random import randint | ||
import pycountry | ||
|
||
case = randint(1, 2) | ||
number = randint(1, 999) | ||
|
||
# TODO: Pick random country from it | ||
|
||
countries = list(pycountry.countries) | ||
country_names = [country.name for country in countries] | ||
|
||
print(country_names) | ||
|
||
# TODO: Try to add languages, too. | ||
|
||
specialCharacters = ( | ||
"!", | ||
"@", | ||
"#", | ||
"$", | ||
"%", | ||
"/", | ||
"?", | ||
":", | ||
"<", | ||
">", | ||
"|", | ||
"&", | ||
"*", | ||
"-", | ||
"=", | ||
"+", | ||
"_", | ||
) | ||
|
||
animals = ( | ||
"ant", | ||
"alligator", | ||
"baboon", | ||
"badger", | ||
"barb", | ||
"bat", | ||
"beagle", | ||
"bear", | ||
"beaver", | ||
"bird", | ||
"bison", | ||
"bombay", | ||
"bongo", | ||
"booby", | ||
"butterfly", | ||
"bee", | ||
"camel", | ||
"cat", | ||
"caterpillar", | ||
"catfish", | ||
"cheetah", | ||
"chicken", | ||
"chipmunk", | ||
"cow", | ||
"crab", | ||
"deer", | ||
"dingo", | ||
"dodo", | ||
"dog", | ||
"dolphin", | ||
"donkey", | ||
"duck", | ||
"eagle", | ||
"earwig", | ||
"elephant", | ||
"emu", | ||
"falcon", | ||
"ferret", | ||
"fish", | ||
"flamingo", | ||
"fly", | ||
"fox", | ||
"frog", | ||
"gecko", | ||
"gibbon", | ||
"giraffe", | ||
"goat", | ||
"goose", | ||
"gorilla", | ||
) | ||
|
||
colour = ( | ||
"red", | ||
"orange", | ||
"yellow", | ||
"green", | ||
"blue", | ||
"indigo", | ||
"violet", | ||
"purple", | ||
"magenta", | ||
"cyan", | ||
"pink", | ||
"brown", | ||
"white", | ||
"grey", | ||
"black", | ||
) | ||
|
||
chosenanimal = animals[ | ||
randint(0, len(animals) - 1) | ||
] # randint will return max lenght but , tuple has index from 0 to len-1 | ||
chosencolour = colour[randint(0, len(colour) - 1)] | ||
chosenSpecialCharacter = specialCharacters[randint(0, len(specialCharacters) - 1)] | ||
|
||
if case == 1: | ||
chosenanimal = chosenanimal.upper() | ||
print(chosencolour + str(number) + chosenanimal + chosenSpecialCharacter) | ||
else: | ||
chosencolour = chosencolour.upper() | ||
print(chosenanimal + str(number) + chosencolour + chosenSpecialCharacter) | ||
|
||
# Try to consolidate unify the characters. | ||
|
||
|
||
# The program can be further improved. |