At Westonci.ca, we connect you with the answers you need, thanks to our active and informed community. Discover comprehensive solutions to your questions from a wide network of experts on our user-friendly platform. Get immediate and reliable solutions to your questions from a community of experienced professionals on our platform.

Write a python function that checks whether a string is a valid password. Suppose the password rule is as follows:
• A password must have at least eight characters.
• A password consists of only letters and digits.
• A password must contain at least two digits.
Write a program that prompts the user to enter a password and displays "valid password" if the rule is followed or
"invalid password" otherwise.