Homework: Quiz Score Advice

I have (apparently) the exact same implementation as the ‘Solution Walkthrough’ however I got this message:
Your submission contains unexecuted code:
You have 1 more lines of unexecuted code than the solution, which is more than the limit of 0.

Is this an error?
I changed my logic to another conditional and the solution was accepted then I saw the ‘Solution Walkthrough’ I see it was the same previously I wrote but I get that error message and I don’t know what could I miss.

Thanks for your assistance!

Hey @angelinux, Im getting the same error and there should be no unexecuted code and all lines should be executed once. Guess its a bug

We added some of the code quality checks after the solution walkthroughs were recorded.

However, what’s probably causing the problem is something like this:

if (quizScore < 70) {
  // something
} else if (quizScore >= 70 && quizScore < 80) {
  // something else
}

While what’s provided above works, you’ll notice that the quizScore >= 70 is redundant. If we reach that conditional, we know that quizScore >= 70, because we’ve already determined that quizScore < 70.

Hopefully that makes sense.

1 Like