Question: Task: Assume you are creating a new account for some service and you need to provide a password. The password should satisfy the following requirements
Task: Assume you are creating a new account for some service and you need to provide a password. The password should satisfy the following requirements to be accepted:
The password should be at least 6 characters long and at most 20 characters.
It must have at least one lowercase letter, one uppercase letter and one number.
Write a program (password_rules.py) using the methods in the table above, that prompts the user to issue a password and checks if the password is valid. If the password is valid, it will print a confirmation statement. Otherwise, it should print a statement

SAMPLE OUTPUT Password rules: 1. Should be at least 6 characters long and no more than 20 characters 2. Should include mix of upper- and lower-case letters 3. Should include at least one digit Password: gwertiY Password not according to the rules. Password rules: 1. Should be at least 6 characters long and no more than 20 characters 2. Should include mix of upper- and lower-case letters 3. Should include at least one digit Password: QwertiY Password not according to the rules. Password rules: 1. Should be at least 6 characters long and no more than 20 characters 2. Should include mix of upper- and lower-case letters 3. Should include at least one digit Password: Qwerty123 Password accepted
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
