A
Programming with Python
MICRO-PROJECT REPORT
On
“Random Password Generator”
Has been
Submitted in partial fulfilment of
Programming with Python
Microproject Report
UNDER THE GUIDANCE OF
Prof. Dhobale M. R.
NBA Accredited & ISO 9001:2015 Certified
VIDYA VIKAS PRATISHTHAN POLYTECHNIC
SOLAPUR
NBA Accredited & ISO 9001:2015 Certified VIDYA VIKAS
PRATISHTHAN POLYTECHNIC SOLAPUR
CERTIFICATE
This is to certify that the Micro-project
“Random Password genrator”
Has been completed by
1.Adaki Lokesh 2208540084
2.Nagul Vedant 2208540090
3.Sadul Shrihari 2208540102
4.Sandupatla Pavan 2208540193
5.UdayKumar Jadhav 2108540271
Of
T.Y. (Computer Engineering) Institute Code - 0854
Has been submitted in partial fulfilment
Programming with Python
Micro-project as per the curriculum laid by M.S.B.T.E. Mumbai,
during the academic year 2024-2025.
Prof. Dhobale M. R. Prof. Dhobale M. R.
(GUIDE) (H.O.D.)
INDEX
Sr. no Title Page no.
1. Introduction 1
2. Program 2
3. Output 4
4. Conclusion 5
INTRODUCTION
Introduction to Random Password Generator
In today's digital age, where cybersecurity threats are ever-increasing, creating
strong and unique passwords is essential to safeguarding personal and sensitive
information. Weak passwords are one of the most common vulnerabilities that
hackers exploit to gain unauthorized access to accounts, systems, and data.
Thus, generating random, complex passwords is a crucial step in enhancing
security and reducing the risk of cyberattacks.
The Random Password Generator is a Python-based tool designed to automate
the process of generating strong, secure, and unpredictable passwords. This tool
addresses the growing need for robust password creation, ensuring that users
can quickly generate passwords that meet security standards without having to
manually think of a combination of characters.
The generator allows customization in terms of:
Password length: Users can specify how long they want their password to be,
which can help meet different security requirements.
Character types: Users can choose to include uppercase letters, numbers, and
special characters in the password, which significantly enhances its complexity
and strength.
Randomness: By using a combination of letters, numbers, and special
characters, the generator creates passwords that are highly unpredictable,
making them resistant to brute force attacks and common guessing techniques.
1
PROGRAM
import random
import string
def generate_password(length=12, use_uppercase=True, use_numbers=True,
use_special_chars=True):
# Define the characters available for password generation
lower_chars = string.ascii_lowercase
upper_chars = string.ascii_uppercase
digits = string.digits
special_chars = string.punctuation
# Start with lowercase characters
password_chars = lower_chars
# Add other character sets based on the user's preferences
if use_uppercase:
password_chars += upper_chars
if use_numbers:
password_chars += digits
if use_special_chars:
password_chars += special_chars
# Randomly generate the password
password = ''.join(random.choice(password_chars) for i in range(length))
return password
def main():
print("Welcome to the Random Password Generator!")
# Ask for password length and other preferences
length = int(input("Enter the desired password length: "))
use_uppercase = input("Include uppercase letters? (yes/no): ").lower() ==
'yes'
use_numbers = input("Include numbers? (yes/no): ").lower() == 'yes'
use_special_chars = input("Include special characters? (yes/no): ").lower() ==
'yes'
# Generate the password
password = generate_password(length, use_uppercase, use_numbers,
use_special_chars)
2
print(f"Your randomly generated password is: {password}")
if name == " main ":
main()
3
OUTPUT
4
CONCLUSION
In this report, we will explore the features, functionality, and the implementation
of the Random Password Generator program written in Python. We will also
discuss its benefits, use cases, and potential improvements, making it a valuable
tool for both individuals and organizations looking to enhance their digital
security practices.