# Week 3 Programming Assignment: Single Perceptron Neural Networks for Linear Regression

**URL:** <https://community.deeplearning.ai/t/week-3-programming-assignment-single-perceptron-neural-networks-for-linear-regression/546055>\
**Category:** Linear Algebra for Machine Learning and Data Sc...\
**Tags:** week-module-3\
**Created:** [January 16, 2024, 2:35pm UTC](https://community.deeplearning.ai/t/week-3-programming-assignment-single-perceptron-neural-networks-for-linear-regression/546055 "2024-01-16T14:35:01Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tamara\_Bonheur](https://avatars.discourse-cdn.com/v4/letter/t/958977/32.png) [@Tamara\_Bonheur](https://community.deeplearning.ai/u/Tamara_Bonheur)\
**Post date:** [January 16, 2024, 2:35pm UTC](https://community.deeplearning.ai/t/week-3-programming-assignment-single-perceptron-neural-networks-for-linear-regression/546055/1 "2024-01-16T14:35:01Z")

</div>

- Week 3 programming assignment  
Hi ! I am trying to complete week 3 programming assignment. The first time i submitted my assignment all of my codes ran but one. Now that I try to edit it all my test are running but when I recieve my grading it says coded could not run or y isnt defined

---

<div class="post-metadata">

**Author:** ![lucas.coutinho](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/lucas.coutinho/32/155465_2.png) [@lucas.coutinho](https://community.deeplearning.ai/u/lucas.coutinho)\
**Post date:** [January 16, 2024, 3:09pm UTC](https://community.deeplearning.ai/t/week-3-programming-assignment-single-perceptron-neural-networks-for-linear-regression/546055/2 "2024-01-16T15:09:45Z")

</div>

Hi @Tamara_Bonheur

Before submitting your solution, you must doublecheck that the notebook runs entirely - without any error. If there is any exception being thrown, it will break the grader.

If you want to skip part of the exercise, you should add `# grade-up-to-here` before **the last cell you want to be skipped** , this will make the grader ignore **everything** that comes after the statement.

if this does not help you, let me know.

Thanks,  
Lucas

---

<div class="post-metadata">

**Author:** ![Tamara\_Bonheur](https://avatars.discourse-cdn.com/v4/letter/t/958977/32.png) [@Tamara\_Bonheur](https://community.deeplearning.ai/u/Tamara_Bonheur)\
**Post date:** [January 16, 2024, 3:29pm UTC](https://community.deeplearning.ai/t/week-3-programming-assignment-single-perceptron-neural-networks-for-linear-regression/546055/3 "2024-01-16T15:29:22Z")

</div>

Thanks Lucas. I think that’s what it is. One of my cells aren’t running properly but I’m not sure how to fix it. For my code to make sure all test run correctly I’m getting this message:

NameError Traceback (most recent call last)  
 in   
----\> 1 w3\_unittest.test\_forward\_propagation(forward\_propagation)

NameError: name ‘w3\_unittest’ is not defined

---

<div class="post-metadata">

**Author:** ![Kic](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/kic/32/76339_2.png) [@Kic](https://community.deeplearning.ai/u/Kic)\
**Post date:** [January 16, 2024, 3:34pm UTC](https://community.deeplearning.ai/t/week-3-programming-assignment-single-perceptron-neural-networks-for-linear-regression/546055/4 "2024-01-16T15:34:42Z")

</div>

HI @Tamara_Bonheur ,

The error message suggested that the execution environment is not up to date. You need to refresh the kernel and rerun the code from start.

---

<div class="post-metadata">

**Author:** ![TMosh](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/tmosh/32/9321_2.png) [@TMosh](https://community.deeplearning.ai/u/TMosh)\
**Post date:** [January 16, 2024, 4:22pm UTC](https://community.deeplearning.ai/t/week-3-programming-assignment-single-perceptron-neural-networks-for-linear-regression/546055/5 "2024-01-16T16:22:46Z")

</div>

Note that “grade up to here” doesn’t really work reliably. If you leave any code in your notebook that has invalid syntax (like a “None” statement you haven’t replaced yet), the grader will crash, and give you confusing error messages.

---

<div class="post-metadata">

**Author:** ![lucas.coutinho](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/lucas.coutinho/32/155465_2.png) [@lucas.coutinho](https://community.deeplearning.ai/u/lucas.coutinho)\
**Post date:** [January 16, 2024, 4:36pm UTC](https://community.deeplearning.ai/t/week-3-programming-assignment-single-perceptron-neural-networks-for-linear-regression/546055/6 "2024-01-16T16:36:49Z")

</div>

As @Kic mentioned, it looks like the file w3\_unittest.py is missing from your workstation. Please follow the instructions [here to refresh your workspace](https://www.coursera.org/learn/machine-learning-linear-algebra/item/cfleU) and get new copies of the files.

---

<div class="post-metadata">

**Author:** ![TMosh](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/tmosh/32/9321_2.png) [@TMosh](https://community.deeplearning.ai/u/TMosh)\
**Post date:** [January 16, 2024, 4:46pm UTC](https://community.deeplearning.ai/t/week-3-programming-assignment-single-perceptron-neural-networks-for-linear-regression/546055/7 "2024-01-16T16:46:14Z")

</div>

Can you post a screen capture image of your workspace and that error message? That might be helpful to diagnose the issue.

---

<div class="post-metadata">

**Author:** ![Tamara\_Bonheur](https://avatars.discourse-cdn.com/v4/letter/t/958977/32.png) [@Tamara\_Bonheur](https://community.deeplearning.ai/u/Tamara_Bonheur)\
**Post date:** [January 16, 2024, 5:08pm UTC](https://community.deeplearning.ai/t/week-3-programming-assignment-single-perceptron-neural-networks-for-linear-regression/546055/8 "2024-01-16T17:08:27Z")

</div>

Thank you all! After a few tries it worked

---

<div class="post-metadata">

**Author:** ![Rahul\_Sharma19](https://avatars.discourse-cdn.com/v4/letter/r/e36b37/32.png) [@Rahul\_Sharma19](https://community.deeplearning.ai/u/Rahul_Sharma19)\
**Post date:** [January 30, 2024, 1:50am UTC](https://community.deeplearning.ai/t/week-3-programming-assignment-single-perceptron-neural-networks-for-linear-regression/546055/9 "2024-01-30T01:50:42Z")

</div>

It not helped me

---

<div class="post-metadata">

**Author:** ![Rahul\_Sharma19](https://avatars.discourse-cdn.com/v4/letter/r/e36b37/32.png) [@Rahul\_Sharma19](https://community.deeplearning.ai/u/Rahul_Sharma19)\
**Post date:** [January 30, 2024, 2:00am UTC](https://community.deeplearning.ai/t/week-3-programming-assignment-single-perceptron-neural-networks-for-linear-regression/546055/10 "2024-01-30T02:00:21Z")

</div>

All my tests passed but still the program is showing There was a problem compiling the code from your notebook. Details:  
name ‘parameters’ is not defined

PLEASE SEE THIS AS QUICK AS POSSIBLE
