Having a problem solving excercise of practice lab week 2 cant seem to undersyand how to add values

When creating a post, please add:

  • Week2
  • Link to the classroom item you are referring to:/notebooks/C1_W2_Linear_Regression.ipynb#ex01
  • Description Cant seem to understand how to use the lab

Hi, welcome to the community!

The labs are based on Jupyter Notebooks that have various cells of codes that you can run individually, step by step to understand the code

To run a cell, click the play type symbol on the left side of the cell. This executes the code in the cell. Cell by cell keep running the code to see the results of the code.

Please feel free to ask more if it’s still not clear

1 Like

Welcome to the Community!

In the programming assignments, each lab typically provides:

  1. Instructions and guidance on what’s expected.
  2. Code cells where you can input your solutions.
  3. Helper functions and starter code to save time and focus on the essential concepts.

For the Linear Regression Lab, the main tasks are to compute the predicted values, compute the cost (or loss), and then perform gradient descent to adjust the parameters.

Tips for getting started

  1. Run cells incrementally: In Jupyter notebooks, run one cell at a time and check the output.
  2. Follow the lab manual carefully: The notebook should provide clear comments and instructions on what to do in each section. Make sure you understand what is expected in each code cell before proceeding.
  3. Hints: If you’re struggling to run the notebook or unsure how to proceed, check the hints or the documentation provided in the lab.

One thing to keep in mind is that posting codes related to your graded assignment is against the community guidelines, so please refrain from doing so. If a mentor wants to see your codes, you can always let them know via personal DM.

1 Like

yeah i understand but it may seem kind of foolish but i am having problem with indentation like i dont understand in the example or hints given to put indents or not.Plus how many attempts do i have cz i already used too and failed.

You have unlimited attempts at the programming assignments.

1 Like

Hey man,

  • Week2
  • Link to the classroom item you are referring to:/notebooks/C1_W2_Linear_Regression.ipynb#ex01
  • Description Cant seem to understand how to use the lab

I too feel lost in the code.

I understand what is being said in the slides and get the material. I learn best when people show me. The Lab is making me feel lost. I would like to move on from the lab i think it’s best for me at this time and continue to learn the information. I am doing this for fun.

1 Like

It’s okay to feel that way. If you need help understanding something, or if you get stuck in the code, just let us know. Feel free to skip ahead and learn more of the material, your intuition for the concepts will only grow stronger as you progress! You can always return to the lab later when you’re ready or feel more confident.

I feel stuck in the code. I have no experience with code prior to taking this course.

It’s understandable to feel stuck, especially if this is your first time working with code. Coding can be challenging at first, but with practice, it will become more intuitive. Since you’re new to coding, it may be helpful to familiarize yourself with Python outside of the course material. If you decide to stick with the theoretical material for now, you can always go back to coding when you feel more comfortable.

I recommend you attend an intro to Python programming course now, then come back to the MLS courses afterward.

Okay that sounds good. Thanks for the feedback. Do you have a course that you recommend?

Here are some suggestions.

1 Like

Thanks. Ill check them out!

I would have appreciated knowing that knowledge of coding was needed for this “Beginner” course before I paid for it. I am not opposed to learning it, but if it’s needed, it should be built into the course.

1 Like

You may also want to watch “CS50 - Introduction to Programming with Python” It’s freely accessible on Youtube or via EdX (link below). I took the course a few months back as a refresher and found it very helpful.