You have to explicitly run or execute the cells in the Jupyter Notebook. Just having the lines of code sitting at the top of the file isn’t sufficient to bring those types into the namespace.
interesting… I was able to run and complete successfully while I was coding without having imports and usage lines in the same cell. Error only happens when I do submission though. Do they compile/run differently?
As long as the learner adds code only where required, everything should work as expected. Only when the learner follows notebook instructions and doesn’t pass the assignment, the grader is at fault.
A few things that can result in a failing grade are:
Adding / removing new cells
Adding / removing print statements
Changing function signature / return type
Adding global imports when you’re expected to work with the existing ones.
@wokee The grader only executes the code in your submitted notebook’s cells that contain graded functions. If you added new dependencies inside those cells/functions, especially if the imports for them are in other cells, no guarantees the autograder will have imported the necessary packages.