I found the BUG case that is causing several correct HWs to be marked wrong

14
3

If the very last line of the code is a comment, it will bug out the grader. Try it. Many of us had a last line print test statements commented out.

The following example will yield "Incorrect. Your procedure did not return the correct value." on submit. Remove the last comment or add an empty line after the comment and it will be marked correct.

example from HW3.3:

def product_list(p):
    if len(p)<1:
        return 0
    product=1
    for e in p:
        product*=e
    return product
#bug it

asked 13 Mar '12, 21:58

Joesph%20Hoffmann-1's gravatar image

Joesph Hoffm...
9944913
accept rate: 100%

edited 13 Mar '12, 21:59

As tmcguire pointed out, it's not just comments. A tab in the very last line will give the following response on submit: "Incorrect. Your submission did not terminate."

I seems like the grade code may be missing a carriage return before appending code.

I should also note that this didn't appear to be a problem with HW2 (I didn't test HW1)

(13 Mar '12, 22:36) Joesph Hoffm... Joesph%20Hoffmann-1's gravatar image

I also got the: "Incorrect. Your submission did not terminate."
but I didn't know why. I'll be checking for tabs next time!

(13 Mar '12, 22:39) Stewart-1 Stewart-1's gravatar image

Yes, I got that! A real pain.

(13 Mar '12, 22:54) Douglas Finn... Douglas%20Finnigan's gravatar image

happenend to me too, but I'm enjoying the course, I don't care for the gradings anymore... it's a Beta, hope to help udacians find the bugs so if they go on production, they will not have any bugs. :)

(13 Mar '12, 23:45) Juan Cruz Juan%20Cruz's gravatar image

8 Answers:

We spent the last two hours looking at the cases that cause this to be graded wrong. You have one of them. There are other weird things (like if you added a statement before that comment) and we are working to track down the source of the problem....

link

answered 13 Mar '12, 22:20

PeterUdacity's gravatar image

PeterUdacity ♦♦
35.9k73219331

nice to know you are on the case so quick

(13 Mar '12, 22:23) DJOldskool-1 DJOldskool-1's gravatar image

I figured this was being looked into, and I thank you for keeping us posted on a bit of the progress.

(13 Mar '12, 22:28) Joshua Herzf... Joshua%20Herzfeldt-Kamprath's gravatar image

Thanks Peter. Yeah it seems like white space on the last line is also causing problems. Were you adding a new line after importing our code in the previous homeworks? This seems to just be a problem with HW3. Thanks for looking in to this!

(13 Mar '12, 22:47) Joesph Hoffm... Joesph%20Hoffmann-1's gravatar image
1

i got all my coding questions graded correctly. I just don't put in comments and add like 2-3 blank lines after the code. I clear the tab at the next line after the procedure is done

(13 Mar '12, 22:54) Sanket Sanket's gravatar image

You need to fix this!

(13 Mar '12, 22:54) Douglas Finn... Douglas%20Finnigan's gravatar image
7

It turns out that it was a bug in Python 2.6.6. We'll have to upgrade all our servers to 2.7 and regrade EVERYTHING.

(13 Mar '12, 23:02) PeterUdacity ♦♦ PeterUdacity's gravatar image

My program runs fine. But on submitting it just gives a "Incorrect. Your submission did not terminate." I removed all my print statements and resubmitted but that did not solve the problem. However, it runs fine and gives the correct answers.

(13 Mar '12, 23:18) Leslie Santi... Leslie%20Santiago-3's gravatar image

ouch! I wonder why we didn't see it in HW2.
I'm glad you found the source of the problem though!
http://www.youtube.com/watch?v=GjjZGyYcH9E

(13 Mar '12, 23:19) Joesph Hoffm... Joesph%20Hoffmann-1's gravatar image

Thanks for all the time you've put into tracking down this bug, @PeterUdacity and all the others.

(13 Mar '12, 23:23) fnenu-1 ♦♦ fnenu-1's gravatar image

Wonderful, @PeterUdacity, thanks for the vigilance!!

(13 Mar '12, 23:42) Joshua Herzf... Joshua%20Herzfeldt-Kamprath's gravatar image

Interesting. Maybe there should be a class requirement on the version of python that everyone should be using when they are running locally as well. Udacity would also run that version of python, so for people following the requirements, the python versions would be 100% synced up for the duration of the class.

(13 Mar '12, 23:44) ydnayabe-1 ydnayabe-1's gravatar image

PeterUdacity if we can help in any way, let us know... once again, that's what we're here for... helping this great idea become better.

(13 Mar '12, 23:47) Juan Cruz Juan%20Cruz's gravatar image

Thanks for taking the time to look into this. I'm a lot happier now. :D

(13 Mar '12, 23:48) Andromeda18_ Andromeda18_'s gravatar image
showing 10 of 14 show 4 more comments

I too had commented lines at the end of my code on 3.7 and 3.8. Once removed and upon re-submitting, my solutions were graded correct. I'm a bit frustrated that this has happened, and am sad to have those graded wrong despite my many hours of checking and re-checking to ensure that they were correct.

That said, I am glad to know that they were indeed correct, and am proud that I was able to get them right (even though they were graded wrong).

link

answered 13 Mar '12, 22:05

Joshua%20Herzfeldt-Kamprath's gravatar image

Joshua Herzf...
847529

Just deleted the last line from homework exercises graded incorrect, and sure enough, now they are correct. Well, at least I will not spend the night by pointless debugging, thanks :-)

link

answered 13 Mar '12, 22:07

Pavel%20Brabec's gravatar image

Pavel Brabec
535219

Not true. I had lots of comments on the last lines, and the answer was graded correct.

not true

link

answered 13 Mar '12, 22:16

Adriana%20Villafa%C3%B1e-4's gravatar image

Adriana Vill...
2751312

I think it has to be exactly one line. I had two empty lines at 3.7, three at 3.8, both were graded correct.

(13 Mar '12, 22:21) Pavel Brabec Pavel%20Brabec's gravatar image

That's HW 2, try it in HW 3

(13 Mar '12, 22:21) Joesph Hoffm... Joesph%20Hoffmann-1's gravatar image

are you sure you didn't have an empty line after your comments Brabi? I just tested my 3.8. I was graded correct. After adding a comment to the very last line I got the "Incorrect. Your procedure did not return the correct value." error.

(13 Mar '12, 22:39) Joesph Hoffm... Joesph%20Hoffmann-1's gravatar image

Thanks for the post! I just uncommented my "print function()" test cases in 3.3, 3.5, and 3.8 and they came back correct. My solution for 3.3 was an exact match for the answer and marked incorrect. It was driving me crazy. Great course, don't mind putting in the time, but this grading was very deflating.

link

answered 13 Mar '12, 22:18

Gregory%20Hughes-3's gravatar image

Gregory Hugh...
1413

My 3.8 was graded incorrect and I had a comment at the end. Deleting the comment made my submission correct, but the grade will remain incorrect of course.

link

answered 13 Mar '12, 22:32

David%20Hubert's gravatar image

David Hubert
198111

I had a left tab after the code and it was graded incorrect. If I remove the last empty line, it is graded as correct.

link

answered 14 Mar '12, 00:03

Sagar%20Patel-1's gravatar image

Sagar Patel-1
11

same thing here. i left single line comments at the end of my code which caused it to be graded incorrectly. thought i was going nuts with so many missed points. anyway, now i know. hopefully they will be corrected.

link

answered 14 Mar '12, 01:07

broad_street's gravatar image

broad_street
1

Your answer
Question text:

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×15,273
×2,216
×1,718
×515
×323

Asked: 13 Mar '12, 21:58

Seen: 854 times

Last updated: 14 Mar '12, 01:07