C1_W2_Assignment Tests All Passed but Submission Failed

Dear all the intelligent people,

I am having trouble submitting the Week 2 assignment.
I passed all the tests, but when I submitted, it said “There was a problem compiling the code from your notebook. Details:name ‘A’ is not defined”

As I am not a familiar user of Python, could anyone help me with this mysterious thing?

Thank you,
Tsai Hsuan

Please post a screen capture image of the cell in your notebook that uses a variable named “A”.


{moderator edit: code removed}

Please let me know what extra information you need from my side! thanks:)

Selecting a specific row of A_system does not perform the requested operations.

You are expected to use the MultiplyRow(), SwapRows(), and AddRows() functions that you created earlier in the notebook.

The course assumes you already know how to write a Python program.
I recommend you take a Python tutorial course, then come back to this one.

Your code must do more than just mechanically duplicate the expected results. The grader tests your code using a completely different (and secret) set of data.

1 Like

  1. Is this the code that you said “mechanically duplicate”?
    Or the third screenshot?

  2. My original question was:
    “I got the error of “A” not defined.” And could you specify what you meant by “Selecting a specific row of A_system does not perform the requested operations.”? Which line, or screenshot of the code?

  3. I tested the first program assignment, which is (supposedly) simple. And yet I another interesting error: “Object required for grading is not found. The # grade-up-to-here comment in the notebook might be causing the problem.”

  4. “You are expected to use the MultiplyRow(), SwapRows(), and AddRows() functions that you created earlier in the notebook.”====.> Perhaps for my poor english, but this is not intuitive for me. I thought each tests are independent. Just a feedback for next round.

Really appreciate your patience. I took Python and tutored the physics bachelor students 3 years ago. I should really picked it up. Thank you for your guidance! :slight_smile:

I was referring to the 3rd image.

All of these that I have marked are example of incorrectly selecting a specific row of A_system.

I’ve not seen that “Object required for grading…” error before.

The reason for implementing those functions is so you can use them in the remainder of the notebook. Otherwise they’re just utilities with no job to do.

1 Like