What it want, to fix it? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What it want, to fix it?

I tried to fix Password Validation Problem, I thought I do everything's that it wanted, but then I saw those errors ( test case #10 + test case #11 ), how to know what it want or unhide them? That's my code, please tell me what's incorrect things that I wrote https://code.sololearn.com/cH76dULqka6l/?ref=app

21st Jan 2020, 10:47 PM
Hedi Muhamad
Hedi Muhamad - avatar
6 Answers
+ 2
Please share the code so that users can see what kind of help you need
21st Jan 2020, 10:54 PM
✳AsterisK✳
✳AsterisK✳ - avatar
+ 1
Without seeing your code..we can't tell...but I coded mine to check for two "different" symbols.....that how I read the challenge..i.e "hel@@lo wo1rl2d" would fail (I assume). "hel@@lo wo#1r2ld" would pass.
21st Jan 2020, 10:59 PM
rodwynnejones
rodwynnejones - avatar
+ 1
Not sure why you need this line.. String in = in1.substring(0, Math.min(14,in1.length())); I removed it.... Changed String in1 = Sc.nextLine() to String in = Sc.nextLine(); ....inputted a password with two different symbols and it worked.
21st Jan 2020, 11:58 PM
rodwynnejones
rodwynnejones - avatar
+ 1
This is kind of wierd...Did mind in python (sometime back) and it passed...ran it again just now and it failed 2 test cases...how is that? I'm thinking I might need to "now" check for a space in the string, but that was not one of the specifications, unless it's assumed we should know to check for spaces anyway.
22nd Jan 2020, 5:46 PM
rodwynnejones
rodwynnejones - avatar
0
rodwynnejones I do it, but it doesn't work.
22nd Jan 2020, 12:41 PM
Hedi Muhamad
Hedi Muhamad - avatar
0
rodwynnejones Thanks, i solved it now. the problem is if a symbol repeated it can't count them, unless one time.
22nd Jan 2020, 5:50 PM
Hedi Muhamad
Hedi Muhamad - avatar