Code coach problem Password validation [SOLVED BY ME].Can anyone suggest a more optimised approach to this problem ??? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 2

Code coach problem Password validation [SOLVED BY ME].Can anyone suggest a more optimised approach to this problem ???

https://code.sololearn.com/ccqEukeNT4l8/?ref=app

1st Oct 2020, 11:35 AM
Bishnu Gupta
Bishnu Gupta - avatar
6 ответов
+ 5
The challenge requires two. It does not care about unique so they could add a test case that causes yours to fail.
2nd Oct 2020, 4:04 AM
John Wells
John Wells - avatar
+ 3
Personally, they should have required letters both lower and upper case. But, !11111! would be strong.
2nd Oct 2020, 4:10 AM
John Wells
John Wells - avatar
+ 1
Gave my code via DM.
2nd Oct 2020, 3:47 AM
John Wells
John Wells - avatar
+ 1
John Wells Yes yours is a more compact code but in my code if the password to is hdgge12!! then the output is"weak" coz my code checks if atleast 2 of the reqd spec chars are present or not like hdgdg12!# is "strong" ie atleast 2 unique spec chars should be present no matter what no of repetition one spec char has.
2nd Oct 2020, 4:01 AM
Bishnu Gupta
Bishnu Gupta - avatar
+ 1
John Wells Okay then.
2nd Oct 2020, 4:06 AM
Bishnu Gupta
Bishnu Gupta - avatar
0
Yes absolutely sir
2nd Oct 2020, 5:34 AM
Bishnu Gupta
Bishnu Gupta - avatar