C2_W2_UNQ_C7 test failed for 1 difference

when I am run the “Test the function” cell, first test is passed, but second test will fail.
It seems there is one difference in a finishing element of the list of Tags.
Error says I have predicted “#”, but the correct answer is “–s–”.
I am not sure what exactly cause this. Can anyone please help?

Hi @kvmmn

This thread can offer you some ideas.

Cheers

thanks i solved it by hard-coding the last element and it passed the test.
but there is sth else:
one of the two notebook’s final test for accuracy is failing! can you give me a hint what causes this, though all other test are passed?

Good work :+1:

It’s hard to predict :slight_smile: Can you copy and paste your error or test output?

I might have misunderstood you. Did you hard-code the last element or you corrected the previous mistake of hard-coding it? Because if you hard-coded the last element, then this might be the cause of your failed test.

1 Like

yes (answer to your question)

so for the record, the problem was when i became 0 (meaning, for the first word), i-1 produced incorrect assigning. So, the POS tag for the last word was getting overwritten by the first word’s POS tag!

to solve that, I modified the start and finish number of the range in for loop, and changed the following expressions, according to those.

thanks for the guidance.

If I understand you correctly you finally managed to solve the compute_accuracy exercise?

I solved it by modifying for loop details in exercise 7.

To anyone reading this, just keep it as is, and you’ll still get the full grade (Or at least it worked for me)