Hi, I’m having trouble debugging an error in one of my codes. This is Improving Deep Neural Neworks: Hyperparameter Tuning, Regularization and Optimisation, Week 2’s programming assessment. In exercise 4 where we have to compute the function gradient_check_n, my code is:

Moderator Edit: Solution Code Removed

The error I’m getting is:

Could someone please help in finding where the problem lies and how to fix it? Thank you!