Skip to content

Files

Latest commit

 

History

History

006-Password Generator(Beginner)

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Password Generator Project

Overview

This Python code is a password generator. It asks the user how many letters, symbols, and numbers they want in their password, and then creates a password based on their preferences.

Topics Covered

  • Importing Necessary Modules:

    • The script starts by importing the random module, which is used to generate random elements.
  • Lists of Characters:

    • Three lists are created: letters, numbers, and symbols. These lists contain characters that can be used to generate the password.
  • Welcome Message:

    • The script prints a welcome message to greet the user.
  • User Input:

    • The script prompts the user to enter how many letters, symbols, and numbers they want in their password.
  • Generating the Password:

    • It creates an empty list called password_list to store the characters of the password.
    • For each desired letter, the script randomly selects a letter from the letters list and adds it to the password_list.
    • Similarly, for each desired symbol and number, the script randomly selects a symbol or number respectively, and adds it to the password_list.
  • Shuffling and Concatenating:

    • After all the characters are added to the password_list, it shuffles the characters randomly to mix them up.
    • Then, it concatenates all the characters in the password_list to form the final password.
  • Output:

    • Finally, the script prints out the generated password for the user to see.

This script allows users to quickly create a unique and secure password tailored to their preferences.