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

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!