Password Complexity Checker

You are given a string representing a password as an argument. Return true if the password passes the following complexity criteria:

  1. Must have at least 8 characters.
  2. Must contain upper case and lower case characters.
  3. Must contain at least two numbers.
  4. Must contain at least 2 of the following special characters !@#$%^&*()


  • Must return either true or false

Example #1


Example #2


Password is only 7 characters long and uses only one special character.

Example #3


Password contains special characters that are not approved.