0
Is there a way for us to see the hidden test cases?
I tried to do some code challenges in community tab of this app after I finished the basic java course here. I found a problem about password, it's difficulty is hard and it's language is java. The problem set a condition that my code should be met, it says that I needed to create a code that can check if the entered password is strong or weak base on the conditions(it must contain 7 or more characters, it must have atleast 2 numbers, it must have 2 special characters). I attempt to do it and my code passes the 12 test cases except the 8th case which is hidden. I am curious and I wanted to know what did I do wrong, um do you have any suggestion regarding this? Thank you!
7 Answers
+ 1
I have reviewed your code and made necessary correction to pass testcase 8... It appears you're trying to reassing a new value to the variable "password" at line 27 and you are checking if just a single special character is found and that makes all following conditional statement in valid
https://code.sololearn.com/cwkXMbX3U05C/?ref=app
+ 2
Greg Andrei Bolivar
[email protected]
says strong & should not.
0
I'll have to try your code on the code coach to determine where the problem is... So I'd suggest you share it on this discussion
0
Um okay, can you please just copy the code here on this link?
https://pastebin.com/watDAmFB
I can't directly paste the full copy of the code. Thanks!
0
Copy and paste the code to sololearn.. save it then share the link
0
Okay.
https://code.sololearn.com/cOPoJ132UBjQ/?ref=app
Is that correct?
0
Ohh I see, so that's why. Thanks alot for your help!😊