+ 1
[SOLVED] C# Password Validation : Test #4
Hi everyone, first post here ! I just finished C# courses and was doing some of the CodeCoaches but I'm stuck on Password Validation. I've got evey test checked except the 4th one which is locked. Here is my code : https://sololearn.com/compiler-playground/clIjIsDBeQVj/?ref=app If you have any Idea if what's the problem or another way to do it, I'm all ears !
3 Respostas
+ 7
Manuel Canfran there is a minor logic error. When a short password is entered (<7 characters) the code prints
Weak
Weak
That is twice, whereas it should print once.
The code passes all tests after this little bug is fixed.
+ 5
Though this is a code coach problem, better to suggest you tips instead of answer. You uses nested loops to iterate over the characters and special characters, making it less efficient. It converts each character to a string for digit checking, which is unnecessary. Also there are few mistakes check patiently.
+ 2
Thanks to the both of you ! I'll change this and try to make it more efficient !