Course 1 Week 3 practice lab: logistic regression Troubles

I was hoping someone could provide an insight to my problem.

Here is my grade responses from the auto-grader currently:
Code Cell UNQ_C1: Function ‘sigmoid’ is correct.
Code Cell UNQ_C2: Function ‘compute_cost’ is correct.
Code Cell UNQ_C3: Function ‘compute_gradient’ is incorrect. Check implementation.
Code Cell UNQ_C4: Function ‘predict’ is correct.
Code Cell UNQ_C5: Function ‘compute_cost_reg’ is correct.
Code Cell UNQ_C6: Function ‘compute_gradient_reg’ is incorrect. Check implementation.
If you see many functions being marked as incorrect, try to trace back your steps & identify if there is an incorrect function that is being used in other steps.
This dependency may be the cause of the errors.

For these 2 (C3&C6) questions I have come to a standstill and I was hoping a mentor or someone could refer me to where I may find the solution to my problem or try to help me solve it.

UNQ_C3 Displays:
{moderator edit: image of code removed}

UNQ_C6 Displays:
{moderator edit: image of code removed}

Hi @yp2

Have you tried following the hints below the exercises? they are very explicit and they provide hints that are more and more detailed.

Check that out and try again. Do post back if you still find any issue.

Hi @yp2,
Just a reminder to please avoid posting your code on the forums.
Posting any error messages is fine - posting your code isn’t.

Thank you for your speedy response, and I am sorry it has taken so long to get back to you. I have implemented the hints, but I am still getting name errors.

In UNQ_3 I am getting an error that states:
NameError: name ‘np’ is not defined

In UNQ_6 I am getting an error that states:

NameError: name ‘map_feature’ is not defined

Have you executed all the cells above?

The NameError: name np’ is not defined is indicative of the first cell not being executed.

‘np’ is the alias assigned to numpy in the first sell with the line:

import numpy as np

Try running all cells above UNQ_6