29
Jun

Check Validity of Password

Question:

Write a program to check the validity of password input by users.

Accept a sequence of comma separated passwords and check them according to the above criteria. Print the valid passwords

Program:

Explanation:

Following are the criteria for checking the password:

1. At least 1 letter between [a-z]
2. At least 1 number between [0-9]
3. At least 1 letter between [A-Z]
4. At least 1 character from [$#@]
5. Minimum length of transaction password: 6
6. Maximum length of transaction password: 12

Output: