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

Python Project

The document outlines a project titled 'Password Generator' created by a group of five members. It includes a Python script that allows users to generate a random password based on selected character sets, including digits, letters, and special characters. The script prompts the user for password length and character set choices, then generates and displays the password.

Uploaded by

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

Python Project

The document outlines a project titled 'Password Generator' created by a group of five members. It includes a Python script that allows users to generate a random password based on selected character sets, including digits, letters, and special characters. The script prompts the user for password length and character set choices, then generates and displays the password.

Uploaded by

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

Project Title

Title: - Password Generator

Group members:

1. Mahapatra Arati (2312118)

2. Pandit Khushi (2312165)

3. Patel Mahek (2312180)

4. Pawar Divya(2312193)

5. Mahale Tanisha(2312117)

**Password Generator**
import string

import random

# Getting password length

length = int(input("Enter password length: "))

print('''Choose character set for password from these :

1. Digits

2. Letters

3. Special characters

4. Exit''')

characterList = ""

# Getting character set for password


while(True):

choice = int(input("Pick a number "))

if(choice == 1):

# Adding letters to possible characters

characterList += string.ascii_letters

elif(choice == 2):

# Adding digits to possible characters

characterList += string.digits

elif(choice == 3):

# Adding special characters to possible

# characters

characterList += string.punctuation

elif(choice == 4):

break

else:

print("Please pick a valid option!")

password = []

for i in range(length):

# Picking a random character from our

# character list

randomchar = random.choice(characterList)

# appending a random character to password

password.append(randomchar)
# printing password as a string

print("The random password is " + "".join(password))

Output:-

You might also like