This document explains the purpose of every file in the Random Password Generator project.
Password_Generator_Project/
├── main.py
├── README.md
├── LICENSE
├── .gitignore
├── PROJECT_STRUCTURE.md
└── screenshots/
├── home.png
├── generate-password.png
├── multiple-passwords.png
├── change-length.png
├── current-settings.png
├── reset-settings.png
├── invalid-input.png
├── invalid-length.png
└── exit.png
The complete source code for the application. It is a menu-driven
console program built entirely with the Python Standard Library
(string and secrets). It contains:
- Configuration constants — default, minimum, and maximum password lengths, and the character pool (letters + digits).
- Input validation functions —
get_valid_length()andget_valid_count(), which reject empty, non-numeric, zero, and negative input without ever crashing the program. - Core generation logic —
generate_password()andgenerate_multiple_passwords(), which usesecrets.choice()for cryptographically secure randomness and''.join()for efficient string building. - Menu action handlers — one function per menu option (generate, change length, generate multiple, view settings, reset settings).
- Menu display and input loop —
display_menu(),get_menu_choice(), andmain(), which tie everything together into a continuously running application until the user exits.
The GitHub-facing project documentation: description, features, tech stack, installation and run instructions, program flow, example output, embedded screenshots, learning outcomes, and author details.
The MIT License, permitting free use, modification, and distribution of this project with attribution.
Standard Python ignore rules so that bytecode caches, virtual environments, IDE settings, and OS-specific files are never committed to the repository.
This file — a guide to what each part of the project is and why it exists.
Real terminal screenshots captured from actual runs of main.py,
covering the home screen, each menu action, and both invalid-input
and invalid-length validation messages. Referenced directly in
README.md.
- No external dependencies. Only
stringandsecretsfrom the Python Standard Library are used. - No persistent storage. Passwords and settings exist only in memory for the duration of a single run; nothing is written to disk.
- No classes. The application is implemented with functions, loops, conditionals, and clear variable names, consistent with the Core Python scope of this assignment.
- Graceful error handling. All numeric input is validated before
use, and
KeyboardInterrupt/EOFErrorare caught at the top level so the program always exits cleanly instead of crashing.