Link to home
Start Free TrialLog in
Avatar of Iryna253
Iryna253

asked on

Python Script

Hello,

I am new to Python. Can you please help me to do the following? I attached Example 4-4 the problem asked.

Write a function that determines whether or not a password is good. We will define a good password to be a one that is at least 8 characters long and contains at least one uppercase letter, at least one lowercase letter, and at least one number. Your function should return True if the password passed to it as its only parameter is good. Otherwise it should return False.
Then use the random password generator from Example 4-4 (copy that function and paste it here) and the function you defined above, write a program that generates a random good password and displays it. Count and display the number of attempts that were needed before a good password was generated. Call the two functions mentioned above from a function named main in the file that you create for this exercise. Ensure that your main program only runs when your solution has not been imported into another file.
Example-4-4.py
ASKER CERTIFIED SOLUTION
Avatar of Mark Brady
Mark Brady
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial