Question: Python Programming Write a function called isValidPassword. It accepts one parameter (a string). It checks whether a string is a valid password. The rules are:
Python Programming
Write a function called isValidPassword. It accepts one parameter (a string). It checks whether a string is a valid password. The rules are:
- Must have at least 8 characters - must have ONLY letters and digits - must contain at least 2 digits
The function returns a Boolean value -- True if the password is valid; False if the password is not valid.
NOTE: There should NOT be any input or print statements in this function!
Create a main program that continually asks the user to enter a password until they type DONE.
The program should call the isValidPassword function, sending the users entry. It should print the users entry and a message indicating whether the password was valid or invalid.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
