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!

9th Feb 2023, 6:14 AM
Greg Andrei Bolivar
Greg Andrei Bolivar - avatar
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
9th Feb 2023, 7:08 AM
Mirielle
Mirielle - avatar
+ 2
Greg Andrei Bolivar [email protected] says strong & should not.
9th Feb 2023, 7:08 AM
Scott D
Scott D - avatar
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
9th Feb 2023, 6:23 AM
Mirielle
Mirielle - avatar
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!
9th Feb 2023, 6:28 AM
Greg Andrei Bolivar
Greg Andrei Bolivar - avatar
0
Copy and paste the code to sololearn.. save it then share the link
9th Feb 2023, 6:38 AM
Mirielle
Mirielle - avatar
9th Feb 2023, 6:44 AM
Greg Andrei Bolivar
Greg Andrei Bolivar - avatar
0
Ohh I see, so that's why. Thanks alot for your help!😊
9th Feb 2023, 7:16 AM
Greg Andrei Bolivar
Greg Andrei Bolivar - avatar