When creating a post, please add:
- Week 2 Graded Assignment
- I was able to complete the first function. When I run the w2_unittest.test_row_echelon_form(row_echelon_form) it says 3 tests passed but 1 failed.The graded doesnt tell anything beyond that. IS there a some guidance how can I correct all any issues?
Please show us the output you get when you run the test.
My suggestion for debugging this in general is to put print statements in your code so that you can track what is happening. They gave a very complete step by step example of how this works in the instructions. So you need to write down the test case and the work out the steps with pencil and paper and then compare that with what your code is doing to see where you are going off the rails.
Your logic handled a trivial case in which you just needed to normalize the diagonal elements, but the second case is clearly wrong: look at the values in the first column. It is 1, 4, 2.5. That is not row echelon form, right?
So you need to add some instrumentation to figure out why the first column is not being handled correctly.