Problem 53720. Secure Password
You are joining the MATLAB Central platform to solve a question on Cody. The signup page, requires you to input an id and a password. Your id is an email address you possess. However, the password must be strong. The website considers a password to be strong if it satisfies the following criteria (More criteria might be added later) :
- Length of the password - atleast 'L' characters.
- It contains at least 'd' digits. (0-9)
- It contains at least 'n' lowercase English character. (a-z)
- It contains at least 'N' uppercase English character. (A-Z)
- It contains at least 's' special character. The special characters are: <>?!@#$%^&*()-+,.~=/{}[]
- There should be no repetition of the same character in password - 'aa', '$$', '33', these are not allowed
- Number of consecutive characters must be less than half of the length of the password (applicable to all except special character)
Example of the last restriction -
P1 = 'abcdODE56789($&'; consecutive characters - 'abcd', 'DE', '56789' = (3+1+4) = 8 instance > 15/2 ==> Invalid
P2 = 'acbdODE67589($&'; consecutive characters - 'DE', '67', '89' = (1+1+1) = 3 instance < 15/2 ==> Valid
Given values, create a Secure password, so that your cody account is safe.
There is no unique output, it will be checked against the criteria mentioned -
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers9
Suggested Problems
-
1351 Solvers
-
Create a cell array out of a struct
1769 Solvers
-
406 Solvers
-
1521 Solvers
-
436 Solvers
More from this Author31
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!