Skip to content

Fix long alphabet list #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions Password-Generator/README.md
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
# Password-Generator
### A Password Generator program to test my learning

This is a simple program implemented in Python that will
generate a password for you.
Password Generator
This Python program is a simple password generator that allows users to create passwords of varying strength levels. The user can choose between 'weak,' 'medium,' or 'strong' passwords and specify the length and composition of the password.

You would have to choose the strength level of password.
Either a weak one a medium or a strong one.
How to Use:
Run the program, and you'll be prompted to select the desired password strength: 'weak,' 'medium,' or 'strong.'

Depending on your choice, you can customize your password as follows:

Weak Password: Select the desired length for a password consisting of lowercase letters.
Medium Password: Specify the number of letters and digits in the password.
Strong Password: Choose the number of letters, digits, and special symbols in the password.
The program will generate the password according to your preferences and display it in red for easy visibility.

If an invalid input is provided, the program will display a warning message.

Dependencies:
This program uses the random module for generating passwords and the colorama library for adding color to the output.

How to Run:
Ensure you have Python installed on your system, and install the required colorama library using the following command:

pip install colorama
4 changes: 4 additions & 0 deletions Password-Generator/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ def main():

def weak_password():
"""This function will generate an weak password for you"""
letters= [chr(i) for i in range(ord('a'), ord('z') + 1)]
print(letters)
"""
letters = [
"a",
"b",
Expand Down Expand Up @@ -51,6 +54,7 @@ def weak_password():
"y",
"z",
]
"""
user_choice = int(input("How long you need your password to be: "))
password = random.choices(letters, k=user_choice)
print("Here is your password: " + Fore.RED + "".join(password))
Expand Down