Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Develop a Python program that does the following: Generates a random password Uses functions Uses the Python randrange() function. It's part of the random library

Develop a Python program that does the following:

Generates a random password

Uses functions

Uses the Python randrange() function. It's part of the random library

Your function should be named generatePassword()

The function should take the length of the password desired and should be a number between 8 and 42.

Your password should contain uppercase, lowercase, the numbers 0-9 and the symbols */?-&

Your function should return the password that was generated

Use string slicing and string concatenation to generate the password

Store all of the passwords you generate in a file named passwords.txt. Make sure you don't overwrite data in this file.

Your program should also ask the user how many times they want to run the password generator and then loop that many times to generate passwords.

Show the program running for 4 different password lengths.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Main Memory Database Systems

Authors: Frans Faerber, Alfons Kemper, Per-Åke Alfons

1st Edition

1680833243, 978-1680833249

More Books

Students also viewed these Databases questions

Question

7. Identify the road of trials in The Lion King.

Answered: 1 week ago