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. 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
def generate password length randomrandint 8 15 Generate random Length between 8 and 15 pass... View full answer
Get step-by-step solutions from verified subject matter experts
