Question: Python code to do a password for a username randomly and automatically. The password should satisfy the conditions: The length of the password should

Python code to do a password for a username randomly and automatically.

Python code to do a password for a username randomly and automatically. The password should satisfy the conditions: The length of the password should be from 8 to 15 . The first character should be a letter(upper case or lowercase) inclusion of one or more numerical digits ('0'.... '9') inclusion of one or more upper-case letters ('A'.... 'Z') inclusion of one or more lower-case letters ('a'.... 'z') inclusion of one or more special characters (@, #, S.%!) Step 1. Use the random module to create the length of the password. Lenth=random.randrange (8,16) # create the length of the password Step 2. set the first element of the password Step 3. set the other elements in the password Step 4. Make the password include at least one digit, one upper case letter, one low case letter, and one special character.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

def generate password length randomrandint 8 15 Generate random Length between 8 and 15 pass... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!