All tests passed but grader giving only 50/100

My code passed all the tests but when I submit the grader gives 50/100

You don’t say which assignment this is, but as a general matter it’s hard to write complete test cases that catch all possible bugs. So passing the tests in the notebook is a necessary but not sufficient condition to pass the grader. Meaning that you should not assume your code is correct and need to examine it with that in mind. One common type of mistake that can cause this scenario is “hard-coding” things in some way so that they happen to work with the test cases in the notebook, but then fail the grader because (e.g.) it uses objects with different dimensions or the like.

Did you click “Show grader output” to see if it gives any more information? Sometimes it will be kind enough to tell you which function has the problem, but not always. :nerd_face:

Sorry for not mentioning, it’s week 3 assignment 1. I will surely review my code by checking the grader output. Thanks for the feedback.