How do I submit the previous version of Programming exercise in Week 3?

The grader has different tests than those in the notebook. There is no guarantee that the notebook tests catch all possible bugs. So if the grader rejects your code, there is most likely a problem that you haven’t found yet.