Final Exam Question 5 - Why did I fail?

Hello,

Final exam question 5 states clearly that it is not about the result list, but how it is displayed:
“NOTE: We are not asking you to consider specifically which documents would be output from the queries below, but rather what fields the output documents would contain.”

So I answered response 1: find({},{title:1, _id:0})
It says I failed !!!
Correct answer is supposed to be the 6th: find({year:1964},{title:1, _id:0})

I am sorry but I clearly do not understand why my asnwer is incorrect, since we do not care about the filter year 1964, and my ‘display’ is correct: title:1 and _id:0

Thanks
JB

2 Likes

This are the two correct answers:

db.movieDetails.find({year: 1964}, {title: 1, _id: 0})
db.movieDetails.find({}, {title: 1, _id: 0})

The question asks you one or more answer :slight_smile: (Check all answers that apply:)

So, your answer is incomplete but right at 50% :slight_smile:

2 Likes

Trouble is, there aren’t two correct answers. Using the filter {year: 1964} actually returns 0 documents, so is this a correct answer - I don’t believe it is, as you wouldn’t get the required result

Hi Mike_Finch_20258,

I believe you must have seen the correct answer by now.

NOTE: We are not asking you to consider specifically which documents would be output from the queries below, but rather what fields the output documents would contain.

The question asks just about which queries will project documents consisting of fields only “title”.

Kanika

4 Likes

i have the same problem

Hello There - I guess I am in same ‘boat’. I DID choose correct answer. Why was it marked wrong?

It says check all answers that apply
So there could be more than one answer that satisfies the given output

I had the same problem, I’ll try the other queries, but I found that one to be what was asked and stopped trying in the exam, so it might have been on me.

I guess this is where the case of the beauty lies in the eye of the beholder applies :slight_smile: Unless the answer is meant to be mathematically correct, it’s like we are needing to setup a debate team. I have to go back and forth too with what answer I am more comfortable to submit :slight_smile:

I believe the question was more about the structure of the output as oppose to the returned data itself. So, filtering with {year: 1964} also produces a similar structure as it includes only title and strips out _id as does the one without 1964 filter i.e {}. Therefore, as Marco_16075 said, you answer is incomplete. A tip would be the provision of checkboxes (more than one) as oppose to radio button (only one).

feeling as if I got cached on a trick. 1 trick from 100% fell sad… :neutral_face:

This question accepts more than one answer, I failed one attempt too because of this! :sob:
But both your queries are right, the answer was just incomplete.

1 Like

Also got dinged by this one.

I think there is another Problem. Not one Answer is right, because there are all in a bad scope. In DB video there is no Document called MovieDetails, so I am unable to solve this test. And also if I do check the querys with the document movies, wich exists, I also only get on right Answer. And Exame says no its Wrong.

Hi @Patrick_40803,

Please check your messages in Discourse.

Let me, know, if you have any questions.

Thanks,
Sonali