Skip to content

dgalvan-zz/password_generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Random Password Generator

This Python script generates a random password based on user-defined criteria, including length, the inclusion of numbers, and the use of special characters. It provides a flexible way to create passwords meeting specific requirements.

How to Use

  1. Requirements

o Python 3.x

o random and string modules (commonly available with Python)

  1. Running the Script

o Run the Python script in your preferred Python environment.

o Enter the minimum length for the password when prompted.

o Respond to the queries about including numbers and special characters by typing 'y' for yes or 'n' for no.

  1. Generated Password

o The generated password will be displayed as the output.

Code Overview

• generate_password function: Accepts parameters for minimum length, the inclusion of numbers, and special characters to create a random password.

• Uses Python's random and string modules to generate a password with a mix of letters, numbers, and special characters based on user preferences.

• Ensures the inclusion of specified characters in the generated password based on the user's criteria.

• Validates and generates a password that meets the defined criteria.

Example

min_length = 12

has_number = True

has_special = True

psd = generate_password(min_length, has_number, has_special)

print("The password generated is:", psd)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages