# Programming Assignment - Week 1 -Exercise 3

**URL:** <https://community.deeplearning.ai/t/programming-assignment-week-1-exercise-3/295869>\
**Category:** Calculus for Machine Learning and Data Science\
**Tags:** week-module-1\
**Created:** [March 24, 2023, 1:15pm UTC](https://community.deeplearning.ai/t/programming-assignment-week-1-exercise-3/295869 "2023-03-24T13:15:21Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Syed\_Hamza\_Tehseen](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@Syed\_Hamza\_Tehseen](https://community.deeplearning.ai/u/Syed_Hamza_Tehseen)\
**Post date:** [March 24, 2023, 1:15pm UTC](https://community.deeplearning.ai/t/programming-assignment-week-1-exercise-3/295869/1 "2023-03-24T13:15:21Z")

</div>

Hi, Can anyone explain exercise 3 of the programming assignment in a little bit detail? Thank You

---

<div class="post-metadata">

**Author:** ![Isaak\_Kamau](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/isaak_kamau/32/124242_2.png) [@Isaak\_Kamau](https://community.deeplearning.ai/u/Isaak_Kamau)\
**Post date:** [April 5, 2023, 5:43pm UTC](https://community.deeplearning.ai/t/programming-assignment-week-1-exercise-3/295869/2 "2023-04-05T17:43:34Z")

</div>

Hello, @Syed_Hamza_Tehseen  
I think it’s good to mention which concept you need some clarity/on the specific error you might be having. That way you will get help much more quicker…

---

<div class="post-metadata">

**Author:** ![Kumaraswamy\_Minuku](https://avatars.discourse-cdn.com/v4/letter/k/b5a626/32.png) [@Kumaraswamy\_Minuku](https://community.deeplearning.ai/u/Kumaraswamy_Minuku)\
**Post date:** [April 21, 2023, 5:57am UTC](https://community.deeplearning.ai/t/programming-assignment-week-1-exercise-3/295869/3 "2023-04-21T05:57:05Z")

</div>

Same issue for me also

---

<div class="post-metadata">

**Author:** ![yjcb22](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/yjcb22/32/127956_2.png) [@yjcb22](https://community.deeplearning.ai/u/yjcb22)\
**Post date:** [April 21, 2023, 2:02pm UTC](https://community.deeplearning.ai/t/programming-assignment-week-1-exercise-3/295869/4 "2023-04-21T14:02:33Z")

</div>

Dear @Kumaraswamy_Minuku @Syed_Hamza_Tehseen So, Course 2: Calculus. Programming assignment for Week 1 - Exercise 3:

1. The general idea of the assignment is to load some data froma CSV file and then create a cost function L(w) and find the minimal value of that function.
2. In exercise 1 you have load the data and plot it to visually analyze it.
3. In exercise 2 you have created the cost function
4. In exercise 3 you will:  
a. Create an array that will contains the numbers from 0 to 1 -including the number 1- (1001 values)  
b. Create a function L\_of\_omega\_array that will receive the previous array as parameters and it will create another array filled with zeros with the same size of the array just received. Then, it will loop over the array and for each value in the array it will pass the value to the function L\_of\_omega defined in Exercise 2 and finally with the result obtained with the function it will replace the value in the array filled with zeros. So, at the end where you used to have zeros you will end up having the result of the Loss functions calculated for the numbers from 0 to 1.  
c. Finally you will find the minimum value (index and value) in the array you just filled (instead of the zeros)

I think it will be easier if you guys ask the specific line where you are not figuring out what to do so I can explain. I hope this helps.

---

<div class="post-metadata">

**Author:** ![Cos\_Fi](https://avatars.discourse-cdn.com/v4/letter/c/838e76/32.png) [@Cos\_Fi](https://community.deeplearning.ai/u/Cos_Fi)\
**Post date:** [July 12, 2023, 2:53am UTC](https://community.deeplearning.ai/t/programming-assignment-week-1-exercise-3/295869/5 "2023-07-12T02:53:11Z")

</div>

Forgive my newness to Python:

What value should I set?

 ![image](https://global.discourse-cdn.com/dlai/original/3X/2/7/2753421a0dbdab7c2ef64a3c94f9e991222a24dc.jpeg)

Thank you so very much.

---

<div class="post-metadata">

**Author:** ![Arturo\_Villanueva](https://avatars.discourse-cdn.com/v4/letter/a/f19dbf/32.png) [@Arturo\_Villanueva](https://community.deeplearning.ai/u/Arturo_Villanueva)\
**Post date:** [August 13, 2023, 2:28am UTC](https://community.deeplearning.ai/t/programming-assignment-week-1-exercise-3/295869/6 "2023-08-13T02:28:00Z")

</div>

L = L\_of\_omega(omega\_array[i]) instead of your actual line
