How to do test 4 in Password Validator? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
25th Feb 2021, 8:14 AM
Ситникова Варвара
Ситникова Варвара - avatar
2 Answers
+ 2
The error is because of the first condition, as it outputs "Strong" if it is less than 7 which is not correct based on the problem. To Solve: 🔹Just change the "Strong" to "Weak" __________________ if (s.length() < 7) return "Weak"; __________________
25th Feb 2021, 9:40 AM
noteve
noteve - avatar
+ 2
Thank you
25th Feb 2021, 9:52 AM
Ситникова Варвара
Ситникова Варвара - avatar