C1W2 Gaussian Elimination Exercise 3

Please read my last few replies on this thread, and provide additional information.

For those who find this thread later:
It is vital that you not modify the notebook file name.

Regardless of what file you have open, the grader always uses the ipynb file with the original name for that assignment.

So, do not rename your notebook file.

1 Like

{moderator edit - solution code removed}

I am not able to find the mistake in my code as it is showing wrong answer. Can anyone please help me out here?
def back_substitution(M):-> This is the function that I want to implement in the exercise 3.

The value you assign to substitution_row is not correct. It is just the row index, but look how you use that value when you do the actual back substitution operation: you’ve got a scalar value there, which won’t work, right? I’m talking about the line that starts:

row_to_reduce = row_to_reduce .....

Think about what is happening there.

Please do not post your code in the forum. That’s not allowed by the Code of Conduct.

The best method is to post a screen capture image that shows whatever error messages you see, or your test results.

If a mentor needs to see your code, we’ll contact you with instructions.