+ 7

[To report or not] A kind of a bad question, I think.

In java challenges I've encountered this question: Fill in the blanks to print "ii" int i; for(i=1;i<__;i++) { System.out.print("_"); } It allows at least two right answers (for the question asked)! "for(i=1;i<=2;i++)" and "for(i=1;i<3,i++)". (of course else we can have cycle with one iteration and in that lone step print out "ii" but luckily we can not enter two symbols in System.out.print("_") and it is not so obvious that we MUST enter more symbols in for loop). 512 symbols is not enough to descr.!

20th Apr 2017, 5:18 AM
Andrew Harchenko (Tomsk)
Andrew Harchenko (Tomsk) - avatar
7 odpowiedzi
+ 8
Wow, happened to me as well. In C# challenge. So the question was to fill in the blanks to output 11.5: ______ d = 2.5; for (int i = 2; i < 5; i++){ d+=_; Console.Writeline (_); First is obviously double and third is obviously d, but in the second blank I wrote 3. Guess what was the right answer? i Come on, 2+3+4==3+3+3, 2+3+4==9, 3+3+3==9. Getting a bit angry now. Already reported that question, but now I feel more like we need several correct options for questions like this one
20th Apr 2017, 3:29 PM
Dinmukhamed Mailibay
Dinmukhamed Mailibay - avatar
+ 14
Send feedback to SL, that's all I can say to do.
20th Apr 2017, 6:22 AM
SoraKatadzuma
SoraKatadzuma - avatar
+ 6
Most questions here are becoming too dependent on amount of characters you can put there. So if there is one empty space, you have to put 2, if there are two spaces you have to put =3. Same rule applies for "_". You cannot put ii there if there is one space However, I personally don't like that, and I think you should report that, but via email, not via "view correct answers" window
20th Apr 2017, 8:34 AM
Dinmukhamed Mailibay
Dinmukhamed Mailibay - avatar
+ 5
Anyway it's not nice that we are ABLE to enter two RIGHT answers, but only one of them counts as right. :-(
20th Apr 2017, 5:19 AM
Andrew Harchenko (Tomsk)
Andrew Harchenko (Tomsk) - avatar
+ 3
From the same series: Fill in the blanks to get a valid recursion. public static int fact(int num) { if (______) return 1; return num * ____(num-1); num==1 but num==0 num<=1 1==num 0>=num are also correct. Not to mention the fact, that the recursion is actually not valid in the case of negative argument (for the base case defined as num==0)
20th Apr 2017, 8:42 PM
Alx vSeti
Alx vSeti - avatar
+ 1
@Dinmukhamed Mailibay, 3 is clearly wider then i :)
20th Apr 2017, 8:35 PM
Alx vSeti
Alx vSeti - avatar
0
I prefer to use "<" when cycling from 0 till the end of array. In this case "<=2" is more readable for me, than "<3". So "<3" may be considered as bad style :) But if do not like this ambiguity, then you should report.
20th Apr 2017, 10:28 AM
Alx vSeti
Alx vSeti - avatar