C1W2 Gaussian Elimination - Need help - immediately lost

Well, one approach would be just to skip the programming assignments. You can listen to all the lectures and do the quizzes without any programming. You will gain the math part of the knowledge. You won’t get a “certificate”, but you have the knowledge other than knowing how to turn it into code. A Coursera Certificate and $4.50 will get you a Grande Frappucino at Starbucks.

But if your goal in taking M4ML is as preparation for taking MLS and/or DLS, I have bad news for you: those are also programming courses and also don’t teach you the programming. If that’s your desired path, then the best solution is to invest the effort in taking a python course.

Thanks Paul, this is properly sound advice. I think I’ll audit the rest of the classes for the math knowledge, and if I choose to continue on this path, I’ll need to find some beginner courses in python. Onward and upward :slightly_smiling_face:

1 Like

Exact same situation for me :frowning:

hey if you solved the Gaussian Elimination Assignment, can we please get in a zoom or discord call or chat to explain it to me, i’m very stuck and i’v been trying to solve Exercise 2 for a really long time, thank you!

The best idea here is to “instrument” your code with print statements so that you can really see what is going on. But first read through all the instructions again and then take the test case they give you for that function and actually work it out step by step with a pencil and paper so that you are sure you understand the steps. Then compare that to what your code is actually doing. Print the row numbers, column numbers and the values at each step.

Which version of the notebook are you working on? The assignment has recently been updated twice, to improve the student’s experience.

Why -1 here?
image

Also, M is a matrix, so using M[row,:] is better.

1 Like

Instead, here is where you use one of the “get _index_first_non_zero…()” functions.

1 Like

For this, you just use “row_to_reduce”.

And the “be careful with indexing” refers to the index on the left side, not the right.

And after you fix the “-1” issue I mentioned previously, you’ll need to update all of your index values in the remainder of the function.

1 Like

Hello @Alaa_Sweed

Please do not share screenshots of grader cells which mentions your code. Code sharing is only allowed in personal DM if a mentor asks you. Kindly remove the image. it is against Code of conduct.

Regards
DP

1 Like

i passed, first of all thank you very very much for appointing my naivness here, i did everything you said but it turns out i did not use the get index function, and so i thought everything else is wrong instead if it, thanks ALOT!!

1 Like

i removed the image, sorry for the inconvenience!