0% found this document useful (0 votes)
0 views

Project - Password Generator

Uploaded by

sirbaala
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

Project - Password Generator

Uploaded by

sirbaala
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Investigatory Project for

SEE -2024-25
Computer Science(083)
Practical Exam

Student Information

Name:
Class: 11 A
Roll No:
Admission No:
Topic:

School: PM SHRI KV Cossipore

1
CERTIFICATE

This is to certify that this investigatory


project work in the subject of Computer
Science has been done by _____________
of class 11th –A in the academic year
2024-25 for SEE. Practical Examination
on ____________ The student has
successfully completed the project in
Computer Science under guidance of
Mr. Arijit Ghosh as per the syllabus
prescribed by CBSE

____________________
Signature of Internal
Examiner

____________________
Principal’s Signature

2
INTRODUCTION

A few lines describing the project :-

This Python script generates strong, random


passwords tailored to user specifications. It first
prompts the user to input the desired password
length. Then, it presents a menu allowing the user
to select which character sets to include in the
password: digits, letters (both uppercase and
lowercase), and/or special characters. The script
validates user input, ensuring they choose valid
options. If no character set is selected, it provides
a helpful message and exits. Otherwise, it
constructs the password by randomly selecting
characters from the chosen sets and concatenating
them until the specified length is achieved.
Finally, the generated password is displayed to the
user. This tool promotes password security by
enabling users to create complex and customized
passwords that meet their specific need

3
PYTHON CODE
import random
# Defining character sets manually
digits = "0123456789"
letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
special_chars = "!@#$%^&*()_+-=[]{}|;:’,.<>?/"
# Getting password length
lent= int(input("Enter password length: "))
print("""Choose character set for password from these:
1. Digits
2. Letters
3. Special characters
4. Exit""")
charList = ""
# Getting character set for password
while True:
cho = int(input("Pick a number: "))
if cho == 1:
# Adding digits to possible characters
charList += letters
elif cho == 2:
# Adding letters to possible characters
charList += digits
elif cho == 3:
# Adding special characters to possible characters
charList += special_chars
elif cho == 4:
break
else:
print("Please pick a valid option!")
if not charList:
print("No character set selected. Exiting...")
else:
pwd = ""
for i in range(lent):
# Picking a random character from our character list
randomchar = charList[random.randint(0, len(charList) - 1)]
# Appending a random character to password
pwd += randomchar

# Printing password as a string


print("The random password is: ", pwd)

4
Input Screens And Output Screens :-

5
6

You might also like