18. Password Generator Beginner Projects
1. Basic Features
- Input: Allow the user to specify the desired length of the password.
-
Random Password Generation: Use a mix of letters (both uppercase and lowercase), numbers, and
symbols to create a strong password.
- Output: Display the generated password to the user.
2. Workflow
-
User Input:
- Prompt the user to enter the desired length of the password.
- Optionally, ask if they want to include special characters, numbers, or only letters.
-
Password Generation Logic:
-
Use randomization to select characters for the password:
- Uppercase letters (A-Z)
- Lowercase letters (a-z)
- Numbers (0-9)
- Special characters (e.g.,
!@#$%^&*).
-
Ensure the password length matches the user’s input and that it includes the requested character types.
-
Display Result:
-
Show the generated password to the user, making sure it meets the specified criteria (e.g., length,
character types).
3. Error Handling
-
Input Validation:
- Ensure the user inputs a valid number for the password length.
- Handle edge cases, such as extremely short or long passwords.
-
Feedback:
-
Provide clear messages if the user inputs an invalid length or other criteria that are not possible.
4. Optional Features
5. Learning Outcomes
This project will help you practice:
- Randomization techniques for generating passwords
- String handling and manipulation
- User input and validation
- Optionally, working with external libraries (e.g., for copying to the clipboard)