Programming Assignment: Implementing algorithms in Graphs (problem)

Hello community!

I’m working on an assignment in the Algorithms on Graphs course and I’m having trouble submitting C1M3_Assignment.ipynb for review.
When checking in Coursera Autograder I get the following error:
NameError: name ‘distances’ is not defined

This happens in shortest_path, although in my code the distances variable is defined and local tests (unittests) pass without errors.
What have I already checked? (below)
Made sure distances was defined before using
Checked that return is of format (dist, path), where dist is a number, path is a list
Restarted the laptop (Restart & Run All) and checked the tests
Tried deleting and re-uploading the assignment to Coursera
All manual tests pass without errors (“All tests passed!”)

Has anyone encountered this in shortest_path and knows how to get around it?
How can I be sure that Coursera is checking the latest version of the code?
Is there a way to see the full Autograder output for debugging?
and where should I put the code to check and pass the test correctly?

You probably chose the wrong place for the post, you need the course the Algorithms on Graphs. This course GenAI with LLMs.

2 Likes

And what should I do now for passing? Could u explain how to show result to Coursera Checker?

To debug your code, use print(). Coursera calculates the current autograde. Please post your issue in the appropriate course thread.

Assuming you have not changed the name of the Lab or deleted any cells. If you have check in this part of the forum how to reset labs in coursera.

If you have changed anything, send me a copy of the assignment solution in private, I will check it when I can.