0
Quiz declined for MISLEADING !!!
Try to find the answer and tell me why it is misleading. ----- Code: JavaScript ---- How many numbers do you write this code? function fun (n = 0) { var r = Math.random()*100; if (n > 10 + Math.floor(r)) return; n++; fun(++n); console.log(n); } fun(); ----- Hint: The answer is a one-digit number.
8 Respuestas
+ 15
Change the question to 'How many numbers will this code print to the console?' and try to resubmit it. I agree that it is misleading like it is now, sorry.
+ 9
The question itself makes it misleading.
+ 8
It's not just misleading but confusing as well. I'll inform Sololearn to add "confusing" to the list as well.
+ 8
"How many numbers do you write this code?" is like asking, "How many people lives on the sun?".
+ 6
@Javier: There are several things wrong with this question.
Issue #1: The first line isn't grammatically correct. @Tashi N posted a really good alternative:
"How many numbers will this code print to the console?"
Issue #2: The answer will actually be different each time this code is run.
See results from my Code Playground test of this script:
- https://code.sololearn.com/WVZommkjWMDN/#js
Issue #3: The hint provided states the answer will be a single digit. However, in every test I ran, I saw results ranging from 4 to 18 different numbers.
As a final comment, I think questions like this, attempting to be "too clever", end up lacking focus and are needlessly confusing. This is in contrast to other questions that appear to be confusing, but are actually quite clever. The problem is, there are so many examples of both types of questions, it is difficult for newer developers to identify the differences.
It is unfortunate that the goal has become more about being confusing than being meaningful. Perhaps, this subtle difference between "needlessly confusing" and "meaningfully challenging" is what is being referred to when the "misleading" reason is used.
Personally, I would qualify this question as being "needlessly confusing" because I cannot identify which meaningful concept is being emphasized here.
Again, while it may appear there is some gray area in differentiating the two types of questions, the latter is more of an art form that requires focused intent that many skilled developers will be able to identify.
+ 2
Maybe it's difficult or confusing, but misleading?
I've seen some really misleading.
+ 2
javier, amigo, the question is grammatically incorrect, as david said. perhaps is not "misleading" the word the mod must have used, but it's definetely confusing. change it as tashi said, and it will probably be accepted. bullet proof your english with several translators if in doubt *thumbup*
+ 1
@Gavin.. 😕 umm?
Thanks !