I am completely stuck! HELP Week 2 # Practice Lab: Linear Regression - Code Inside

Hi,
I have submitted my work more than 5 times and I have no clue why I am getting a FAIL 0/100. Can someone please review my code and see where I have gone wrong. I cant move on until this is submitted with 80/100. Thanks P.S I believe it may be because of my indentation

2 Likes

For starters:

See how the instructions say that you will return a float called ā€œtotal_costā€, but you are adding another return before the one indicated, and you are returning 2 values: dw, db.

I suggest that you read the section before the exercise. It tells you exactly what formula to apply. One tip is that nowhere in the formula you are calculating a db nor a dW.

Please review the instructions above the exercise in detail, and then review your implementation again.

Thanks,

Juan

Cell #8. Canā€™t compile the studentā€™s code. Error: NameError(ā€œname ā€˜iā€™ is not definedā€)

I keep getting this error message now that I have updated the codes to the above

Both functions above have errors.

The one before the last one: Why are you including a def inside a def?

The last one: you are not writing the whole formula. Read carefully the formula, step by step, and implement it accordingly.

2023-03-25_22-44-52

2 Likes

ok the last one I just need to write the whole formula?

1 Like

Also, why am I not even getting partial marks? why is the system just failing me.

1 Like

I tried to resubmit but still getting the same message
Cell #8. Canā€™t compile the studentā€™s code. Error: NameError(ā€œname ā€˜iā€™ is not definedā€)

this also is not working 404:not found

i wonder if this has something to do with it

I think something is wrong with the numpy now. It wont import it doesnt look like it. Could this be why its now not working? help anyone. thanks

For the numpy issue please make sure you re-run your top cell.

Also: please dont post code here. Please delete all your code above as it is against the code of conduct to post code.

Finally, I still see some issues in some of your code. Please send me via direct message your code and I will give you pointers.

is the issue resolved @Edwina_McKennon

Yes! @Edwina_McKennon was able to solve the issue! :slight_smile: I got confirmation via DM a few days ago.