See results from code that matches expected output. However, i received error message saying no output was produced for the exercise. I am not sure how to correct this and I am unable to proceed with the assignment which is due today. Can I get some help please.
Hi,
If one of the tests produces the expected output, that does not necessarily mean that the solution is correct for all test cases. In many programming assignments, your code is evaluated against a large number of hidden test cases. If the grader reports that no output was produced or that the submission failed, it often indicates that the solution is not handling all required scenarios correctly.
I recommend going back through your implementation and checking for any hard-coded values. A common issue is using specific numbers or fixed inputs instead of the variables provided through the function arguments. Pay particular attention to the parameters passed into the function and make sure your logic is consistently using those variables throughout the solution.
Also verify that your code follows the function signature exactly as provided and that it returns or prints the expected values in the required format.
To add to what @gent.spah said, have you tried restarting the kernel (Kernel β Restart and Clear Output) and running the cells in order, from the very top (import test_your_code)?
Also, if you have by any chance renamed your notebook, the tests would not work. The notebook needs to be the default one (C1M1_Assignment.ipynb).
Just to add, one common issue with this kind of error is the βspaceβ in the print statement.
This will fail the test (notice the space between the word βprintβ and β(β):
print (...)
This will pass:
print(...)
Please follow the advices given to you, and if the issue still remains, let me know.
