C1W2_Assignment Exercise 1

I entered some values in the “None” prompts per instructions in Line 32, while I was able to print arrays A and B, I received traceback error for row_echelon_form(A,B), probably not defined but I am not supposed to change any code.

Secondly, even when I change values in the “None” prompts the results don’t change. If feels like the program is stuck.

What should I do to progress? Please help!

Thank you,

Can you share the error by taking a screenshot.

Do not share any part of the codes, only the output or the error you encountered.



Can you confirm if you are using an updated copy of assignment??

if yes then, you need to check in
def reduced_row_echelon_form(A, B):
check if the iterations over the rows are recalled correctly

First check for this
Find the first non-zero entry in the current row (pivot)

then for this


This is the array I am getting:
It already seems to be in row echelon form.

For me that cells is not the way you are showing, so I highly doubt you are doing an updated assignment.

Also this row echelon form is surely already given but that is after you write correct codes for

GRADED FUNCTION: reduced_row_echelon_form
def reduced_row_echelon_form(A, B):

So because there is an error in this graded function cell, you are getting the value error, which could be related to the pointers I mentioned in the previous comment.

Also notice the difference here between your cell and mine


How do I get to the updated assignment?

Refer point 1.a

Deepti - you are very kind. I appreciate your rapid responses and effort in helping. Dhan

1 Like

Just to be sure @dhankash, once you have a fresh copy, write codes only where it is asked to do so, like between it mentions to write codes only between ###START AND END CODE HERE###
and even inside these two marks you find many instructions given with the place where you need to write code is given as None, so you only need to replace those None and do not edit or add any extra code lines, in order to prevent any error or failure of your assignment grading.

Happy to Help!!!
Keep Learning!!!

I am new to this community and python. I am unable to do the exercise 1 since last night. can someone suggest me how to get tips to complete the exercise.
Thanks in advance.

{mentor edit: code removed}

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

If you don’t have basic Python programming skills, I recommend you attend a tutorial course and then come back to this one.

1 Like

Hi @anilget2009

First make sure you are doing an updated assignment.

next if you notice your test output only differ in the third row,

So check if you have used the correct pivot row while row reduction.

Read the instruction before grade cell, you will find the solution.


1 Like

Thanks Mosh for the headsup!

Thanks Deepti,
The updated Assignment had the clue given in it.

1 Like

That’s great kindly let learners know what was issue with your output. Do not provide the codes but let learners know where you were going wrong.

Keep Learning!!!


Thanks Deepti,
I went through what Deepti mentioned,
First I went to Refresh your workspace and followed the instructions present there
…m pasting here as follows

Refreshing your Workspace

This will come in handy whenever you need to start from scratch, fetch the latest version of the assignment, or run into a 404 error.

  1. Open the notebook from the classroom.
  2. After the notebook opens up, click File → Open
  3. When your workspace opens, tick the check box before your notebook file. After it is selected, press Shutdown. The icon beside the filename should turn from green to gray.
  4. Tick the checkbox again and this time choose Rename and enter any filename other than the original. For example, C4W1_Assignment.ipynb (original) → C4W1_Assignment_v2.ipynb
  5. (Optional) Tick the checkbox of any other file that you want to get a fresh copy of (e.g. dataset files that you might have manipulated irreversibly). Then click Delete . You can also opt to Rename or Download each file individually in case you want to keep them before deleting.
  6. Click on the Help button on the top right of the page.
  7. Click the Get latest version button.
  8. Click the Update Lab button. The page will refresh and you should now see the latest version of the notebook.

Next I also understood that my last row was not being worked upon so I made a mathematical error, so went through the entire of assignment right from beginning followed every thing as given and made sure my code made sense.

That’s it. It worked.

Thanks for all the help!

Hi Deepthi,

Unfortunately i deleted the C1_W2 assignment.
I have done my code art in same document without using a copy if it. i thought it should be delted and have deleted it. please help , how to get the c1_w2 assignmnet now.

i thought of updating it as its not updated. followed the process told by you but unfortunately deleted the original one

Hi @sowmya02

use TOPIC 1a HOW TO GET A FRESH OR LATEST VERSION OF A NOTEBOOK from the below link to get a fresh copy


{assignment link removed by moderator as it is against community guidelines to post codes or share assignment notebook on public post thread}
Hi Deepthi.

The problem is i lost the original question document. i have delelted it. how to get it.