Just a quick question on the way grading works. I was graded 0.11% on PSET 3. It lists a bunch of test cases that it seems to say my code is failing. For example it lists: "finds 42 in {42,43,44}, finds 42 in {41,42,43,44}, doesn't find 42 in {39,40,41}"... and on like this, listing a zero as a grade beside each case.

Just to be clear, I'm running ./find 42. Then I manually input 42, 43, and 44 hitting enter to confirm the input, then I use control-D to end the input, and it reports finding the needle.

When I test each of the cases I got a 0 grade for, it correctly reports finding or not finding the needle.

Can anybody imagine another reason it might be failing, or is there some way to get more specific feedback about the failing grades?

Any insight would be much appreciated, I am fairly confident the code is working as intended. Thanks in advance!

  • Are you certain that the helpers.c code you submitted is the one that you tested? Did you get all green smiles when you checked your work using check50?
    – curiouskiwi
    Aug 11 '15 at 4:58
  • Thank you, actually I was just coming back to say that I had found the problem. I guess I assumed that if I ran find.c it was running with the current state of helpers.c, but helpers wasn't compiling correctly due to a silly error I was making. This really boiled down to me being confused about how make works. I assume because helpers was not compiling correctly, find was using the .o file from the last time helpers did compile? Aug 11 '15 at 5:06
  • That's right. And if you submitted a version of helpers.c that caused the compilation of find to fail, then you would get all 0 on the grading. I put that an answer. Can you please accept it so this can fall off the unanswered queue. Thanks!
    – curiouskiwi
    Aug 11 '15 at 5:08

Be sure that the version you submitted actually compiles and runs, and that you have passed all check50 tests as well.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .