Project: Reggie's Linear Regression (why?)


I made it to chapter 5 of the Python 3 course and can follow the material pretty good. Then I found Project: Reggie’s Linear Regression and I can’t understand why it’s there at this stage of my path to learn Python!?

Sorry but I hate those kind of traditional school like assignments with a passion! The language is too vague and I fail to visualise what I’m supposed to produce as a result. It simply too vague and that’s makes it not only difficult but simply impossible and frustrating for me to understand.


  1. I don’t feel Python Notebooks are appropriate at this point. (but iPython Notebooks on Azure is convenient)
  2. The assignment is too abstract.

" We will use loops, lists, and arithmetic to create a function that will find a line of best fit when given a set of data."

" Reggie wants to try a bunch of different m values and b values and see which line produces the least error. To calculate error between a point and a line, he wants a function called calculate_error() , which will take in m , b , and an [x, y] point called point and return the distance between the line and the point."

  1. An example of the desired result / solution would have been helpful.

So unfortunately I have to skip this Project… I’m pretty sure I could write the code if I understood the assignment, but how it is now I fail to understand.

Why not an assignment like a game, a tool or something else instead of forcing us to data analysing before we are ready? What I like and appreciate about Codecademy are that it takes baby steps trough the material, building on previous material teaching step by step. Unfortunately Reggrions Linear’s Regression doesn’t do that.

PS : Even looking at the solution, and asking someone who is a financial analyst to explain, I still don’t understand the whole thing. This assignment is assuming too much level too soon and fast from some students like me! Teaching Data Analysing is cool but first create the context teaching about it step by step.


I am also struggling with this project. Does anyone know if theres a tutorial/video for this project somewhere ?


same here i dont understand what I should do with the project


I agree. This project is confusing and there seem to be confusing typos throughout?


I’m glad to see i’m not the only one!
This project was not helpful at this point and only served to make me feel like I hadn’t made any progress at all.
The language used in the descriptions is unclear and difficult to follow.


It’s incredibly poorly written and lacks context. I know the math required inside and out, yet I felt completely unprepared for the task at hand. Throughout CodeAcademy’s lessons there are plenty of occasions where a knowledge leap comes into play. the “.pop()” command is one of them. Zero experience and yet we should integrate it on the fly. If I’m paying for a lesson, no stone should be left unturned.

1 Like

I am trying to understand what the point was in creating the “get_y” function at the beginning of the project to only have to redefine “y” in the second part of the project. The instructions for the second function specifically state (4) "Find the difference between the y from get_y and y_point" yet the recommended solution doesn’t even make use of the get_y function.


Hi. I solved this today. Let me know if you would need some help.


Also try

It helps a lot with visualisation of the code


Hi, I’m struggling on the project and need help. Is there a tutorial video?


Hi. I could not find any tutorial. I first googled about how to get the slope of a line. After I read up on it, I then went back to the exercise and used pythontutor to debug my code repeatedly