C2_W2_Assignment: Failed default_check of Compute accuracy

I have a problem with Graduation of Compute Accuracy exercise.
All unit tests passed and the result look valid. However, I get 0/10 scores and the traceback looks invalid. The traceback is

Failed default_check.
<class 'float'>,
but got:
<class 'float'>.

Can you please share more details what could be wrong?

Send me the code for this function in private, I would like to have a look at it!

k here are some problems:

Split the label into the word and the POS tag
Why are you using replace here, just split it!

no more and no less than 2 items
its enough to check the length

store the word and tag separately
why are you replacing the tag? not needed

Remove the float cast in the final result!


You are not supposed to post code solutions here that why I said send this on private.

I also wrote remove entirely the tag part and strip!

1 Like

Hi, Mentor! I have the same question. I couldn’t figure out my mistake. I’ve sent you my code in private. Could you please check it?

Replied with some corrections on private, try to read and understand the comments offered in the lab script and if your solution doesn’t seem to be working out, try to change it, experiment with it!

Thank you very much for your guidance!!!

1 Like