https://github.com/mohamedyounis10/password-generator
This Python script generates random passwords based on user input criteria, ensuring a minimum length of 8 characters.It utilizes a combination of lowercase letters, uppercase letters, digits, and punctuation symbols for password complexity.The script employs shuffling techniques to ensure randomness and delivers the generated password to the user.
https://github.com/mohamedyounis10/password-generator
basics basics-of-python python
Last synced: 4 days ago
JSON representation
This Python script generates random passwords based on user input criteria, ensuring a minimum length of 8 characters.It utilizes a combination of lowercase letters, uppercase letters, digits, and punctuation symbols for password complexity.The script employs shuffling techniques to ensure randomness and delivers the generated password to the user.
- Host: GitHub
- URL: https://github.com/mohamedyounis10/password-generator
- Owner: mohamedyounis10
- Created: 2024-02-23T17:24:25.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-23T17:29:52.000Z (over 1 year ago)
- Last Synced: 2025-04-05T21:26:52.239Z (3 months ago)
- Topics: basics, basics-of-python, python
- Language: Python
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Password Generator
This Python script generates a random password based on user input and certain criteria. Below is a brief overview of how it works:
### Requirements
- Python 3.x### How to Use
1. Run the script.
2. Enter the desired number of characters for your password when prompted.
3. The script ensures that the password has at least 8 characters, prompting the user to input again if the specified length is less than 8.
4. The script generates a password using a combination of lowercase letters, uppercase letters, digits, and punctuation.
5. The generated password is displayed to the user.### Description
- The script imports the `string` and `random` modules to utilize pre-defined character sets and shuffle functions.
- It prompts the user to input the desired length of the password.
- Error handling is implemented to ensure that only numerical inputs are accepted, and the password length is at least 8 characters.
- The script shuffles each character set to ensure randomness.
- The password is constructed by selecting characters from each set according to predefined proportions.
- Finally, the password is displayed to the user.### Example
```
$ python password_generator.py
How many characters do you want for your password?: 12
sx;DfGh3jI4L
```