+ 3
Password Validation (Code Coach) - Test cases #10 & #11 fail
Hello everyone, My code does not pass tests #10 and #11 in the code coach challenge Password Validation. Does somebody have an idea why not? Maybe someone can post the test cases' input? https://code.sololearn.com/cL7zBDDNWWEG/?ref=app Thanks
7 Respostas
+ 9
Seban ,
the issue is how the code checks the special characters. it iterates over the tuple with the special characters and is using find() function.
supposing there are 2 `@` as special chars, the current code will only find 1 of them. this can lead to `weak` as output.
better to iterate over the password, and check if the character is in the special characters tuple. we can use the `in` operator instead of find().
+ 8
.find() gets the first occurrence on the search character.
Suppose you have a pw = "**aaaaa". Your code will find 1 "*" instead of 2.
+ 4
Neku Raymond Create your own thread. Link your code. Describe exactly what it is supposed to do.
+ 3
Ah of course. Thanks a lot to both of you.
https://code.sololearn.com/cb2OtxnG62BZ/?ref=app
0
I am not understanding anything please I need help
0
Neku, it's easier to help if you let us know what you are struggling with.
0
I'm just trying to write a simple code run numbers on phone screen