Python syntax quiz - wrong correct answer

I’m referring to quiz question number 2/13 for the python syntax quiz.

https://www.codecademy.com/courses/learn-python-3/quizzes/learn-python-syntax-quiz

There are two correct answers to the question, A and B.

However, when selecting B as the answer, the quiz says A is the answer but it gives an explanation for B.

@method-runner-2mh8p If we wanted to be really specific (and of course we do :slight_smile: ) only A gives a SyntaxError, since B gives a NameError.

The explanation is only highlighting that it’s not a SyntaxError.

Why does this matter? Let’s say we had a try/except statement and we wanted to specifically catch one type of error but not the other… that’s one scenario where this is relevant.

It also matters in the nature of fixing the error. The fixes to both problems are essentially different in nature.

1 Like

Hey @toastedpitabread, you’re totally right! Thanks for the clarification.

I think the choice B distractor explanation needs a bit more detail to clarify the difference between the SyntaxError and NameError for the learner. As I was doing this question, I hadn’t yet learned to differentiate between types of errors and there was nothing in the course content that covers this.

Or, there should be a way for the learner to compare the explanation for the key with the explanation for the distractor. However this would require significant changes to the conventions of the quizzes in general.

1 Like

However, I just noticed the difference is explained in the cheatsheet:

https://www.codecademy.com/learn/learn-python-3/modules/learn-python3-syntax/cheatsheet

1 Like

Maybe part of the problem I had was that the content of the choices broadly refer to an ‘error’ while the question and answer focus on a SyntaxError.

So if thinking about only…

answer = is_this_an_error

…then I could say ‘Yes’, this is an error.

It’s easy to forget the specific context of SyntaxError defined in the question when reading the content of the choices.

The fact that we both spent time talking about this means we both will remember it more than if you got it right in 5 seconds. Imperfect question? Maybe. But we both got some nice reinforcement.

1 Like

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.