简体   繁体   中英

Write a program to check the validity of password input by users [closed]

I am working on an assignment:

A website requires the users to input username and password to register. Write a program to check the validity of password input by users. Following are the criteria for checking the password:

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

Your program should accept a sequence of comma separated passwords and will check them according to the above criteria. Passwords that match the criteria are to be printed, each separated by a comma.

Example
If the following passwords are given as input to the program: ABd1234@1,a F1#,2w3E*,2We3345
Then, the output of the program should be: ABd1234@1

Here is my code so far:

TBD

My question:

TBD

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM