Week 2 assignment ex 4 help

What have I done wrong?

def augmented_to_ref(A, b):    
    ### START CODE HERE ###

    # moderator edit; code removed

    ### END CODE HERE ###
    
    return A_ref

A_ref = augmented_to_ref(A, b)

print(A_ref)

Test case “default_check”. Wrong output matrix. Check row reduction operations.
Expected:
[[ 1 2 -1 -1 3]
[ 0 1 4 3 22]
[ 0 0 1 3 7]
[ 0 0 0 1 1]]
Got:
[[ 2 -1 1 1 6]
[ 1 -1 2 1 8]
[ -1 26 38 30 258]
[ 0 11 17 13 117]]
Test case “identity_matrix”. Wrong output matrix. Check row reduction operations.
Expected:
[[ 0 1 0 0 1]
[ 0 0 1 1 2]
[ 2 -1 1 -2 0]
[ 0 0 0 -1 0]]
Got:
[[ 1 0 0 0 1]
[ 0 0 0 1 1]
[ 0 4 13 8 25]
[ 0 1 5 3 11]]
2 Tests passed
2 Tests failed

@Mahad_Kamran
Better not to post your answer to here in the community, if you need help you can explain to us and we may try to figure it out.

And your other question u posted before here is the answer:

Let’s know the progress.
thanks

@Mahad_Kamran
Your answer is wrong so try to trace back and the issue is line 13 try to correct that. one

@Mahad_Kamran:

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

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

1 Like

From your other thread, I believe this issue has been resolved.