Tips: It's possible that your implementation was incorrect even though all test passed

As a lot of other learners shared, week4 Assignment is tougher than the previous ones. I run into errors on the last graded block, even though all previous tests passed. I couldn’t find any help on the forum but finally I was able to debug and solve it. The culprit was on the previous block implementation, even though all of the tests passed.
So I just want to share some tips here:

  • Even though all previous tests passed. It doesn’t mean everything you implemented was 100% correct. The test might miss catching some error in your implementation. eg. your implementation was not generic enough, it was just enough to satisfy the test.
  • Observe the error stack trace to find where in your code it’s raising that error. It might be from the previous block implementation.
  • Review and debug that code again. Read the instruction carefully, most of my error was just not following the instruction to the t.
  • Search the forum, likely there are already solution / hints for your problem.
    Good luck! I hope that helps :slight_smile:
3 Likes

@r.ai, thanks for the tips. That’s good advice.

@r.ai @TMosh Yes, his tips are great and he is more than welcome for contributing ! – Sorry, this was kind of just a burning question I’ve had in my mind for awhile, but I just wasn’t sure whom to ask it to…

@Nevermnd, the “AI Discussions” forum might have been a good choice.