diff --git a/README.md b/README.md index 9dc50c3..c4ee4e3 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,16 @@ -# password-generator - +# Simple Password in Python +------------------------------ A simple password generator with the ability to create passwords based on user input or customizable for personal Goochic projects. This program is executed in Python and is made up of three files for further customization. To get started, run the file "run.py". You can change password patterns by modifying the "password.py" file -# The license for this project is for +#### Create a password with 50 characters. +![Create a password with 50 characters](img/001.PNG) + +#### Create a password with 6 characters. +![Create a password with 6 characters](img/002.PNG) + +----------------------------- +### The license for this project is for This is a password-generator project, used in Quera's Git course. All Rights Reserved @ Quera - diff --git a/data.py b/data.py new file mode 100644 index 0000000..09ee167 --- /dev/null +++ b/data.py @@ -0,0 +1,3 @@ +alphabet = "abcdefghijklmnopqrstuvwxyzABCDEFGH" +numbers = "0123456789" +special_characters = "@#$%&*" diff --git a/generator.py b/generator.py new file mode 100644 index 0000000..6269283 --- /dev/null +++ b/generator.py @@ -0,0 +1,10 @@ +import random + + +def generate_password(length, data): + password = '' + for i in range(length): + index = random.randint(0, len(data) - 1) + character = data[index] + password += character + return password diff --git a/img/001.PNG b/img/001.PNG new file mode 100644 index 0000000..fc62140 Binary files /dev/null and b/img/001.PNG differ diff --git a/img/002.PNG b/img/002.PNG new file mode 100644 index 0000000..a1a2861 Binary files /dev/null and b/img/002.PNG differ diff --git a/run.py b/run.py index 68b9e96..93e033a 100644 --- a/run.py +++ b/run.py @@ -1,8 +1,8 @@ from data import * from generator import generate_password -password_length = int(input("How long should the password be? ")) +password_length = int(input("\n How long should the password be : ")) data = alphabet + numbers + special_characters password = generate_password(password_length, data) -print("Here is your password: {}".format(password)) +print("\n your password => {}\n".format(password))