I need help with the graded code assignment if anyone can help me pls do there are 3 exercises but only 2 show up and my code gets 25/50
Hi. Please upload a screenshot of the grader feedback so the Mentors can get more context about the errors you’re getting. Thank you.
Hi. The section involving Exercise 3 is optional so you will only see the first two. From the grader feedback, it seems like your functions are only returning 0. Did you pass all the unit tests within the notebook? Also make sure that there are no cells throwing an error.
It seems that you are experiencing issues with the solutions in your functions. As Chris mentioned, we are not sure if you are following the instructions of the assignment carefully.
Are you going through the assignment requirements properly? You are expected to fill in the code in a way that generalizes to all test cases, not just specific examples.
I would strongly suggest that you re-read the assignment instructions and focus on implementing the solution between the designated start and end code sections. The key requirement is that your code should be general and work for all testing cases, so you should avoid hardcoding values for specific inputs.
Try to approach the problem by thinking about the logic and patterns rather than individual cases, so your solution remains correct across all tests.
If you feel that your Python or programming fundamentals are still not strong enough yet, it may be helpful to strengthen them first before continuing. There are several good introductory courses available online, such as Python for Everybody from the University of Michigan (previously on Coursera), which is a well-known and solid starting point.
Can i tell you my code and can you help me debug it?
{mentor edit: images of assignment code removed}
Sorry, but students are not allowed to share their code on the forum.
I have edited your post.
I believe you were notified of this policy two weeks ago in another thread.
Okay sorry
But any tips or tricks for this assignment?
Tips:
- Manually save your notebook before you send it for grading. The auto-save is not reliable.
- Did you change the name of your notebook ipynb file? Don’t do that.
- Did you add, delete, move, or copy any cells inside the notebook? Don’t do that.
- Have you completed all of the sections of the assignment?
- Does your code pass all of the built-in tests? Check this very carefully.
- Did you change anything in any cell other than where it specifically says to add your code?
- Use the “Kernel-> Restart and clear all output” then “Cell → Run all”, and check everything again.
can you send me a screen shot of the results of a built in test would be i can not find it.
The notebook tells you exactly what the results should be.
And how od you know if its correct without submitting
There are two totally different sets of tests.
- Tests that are built into the notebook. You run these test by executing the code in the test cells. Your results are displayed, along with the expected results. For some tests, you will also see green text “All tests pass”.
- Tests that are run by the grader, when you submit the notebook. These are entirely different tests, and you get detailed feedback from the grader about any errors.
but where are those tests
They are in the notebook’s code cells.
THanks
