+ 1

Halloween Candy code challenge

Can someone explain this question? What kind of logic is used here, in this question? watch out now: with 3 items you have 66% chance, with 4 you have 50% chance, and with 10 you have 20% chance. Only looking in the answers you can get number 2(but why on the earth number two) and use it in formula,but never ever in the ethernity you cant get correct answer based on question alone. This question should be deleted,banned,forbiiden or give the creator Nobel prize idk. or please just explain it,maybe i just dont get it right.

2nd Sep 2023, 9:34 PM
Samir Krasnic
Samir Krasnic - avatar
4 ответов
+ 3
Two houses out of however many you visited are giving out dollar bills. What percentage is that? Round up the result to the nearest whole percentage. Try not to over-think it. [What they left out is that you get one piece of candy from the houses that gave out candy.]
3rd Sep 2023, 12:11 AM
Brian
Brian - avatar
+ 2
Maybe you read it too fast. The last sentence of the first paragraph puts it this way: "One house that you visit is giving out toothbrushes and two houses are giving out dollar bills." They give more information than is needed, and some of the information is implied or assumed. I think it is so as to give real practice interpreting what non-technical users often do when they give requirements. Glad to see that you solved it.
3rd Sep 2023, 9:01 AM
Brian
Brian - avatar
0
Ok,but it would be much easier if they put in question that only two houses give out dollar bills.
3rd Sep 2023, 7:25 AM
Samir Krasnic
Samir Krasnic - avatar
0
Haha
4th Sep 2023, 1:41 PM
Shubham Verma
Shubham Verma - avatar