automatically grading small programming assignments

Beliavsky beliavsky at aol.com
Thu Dec 14 13:00:53 EST 2006


Brian Blais wrote:
> Hello,
>
> I have a couple of classes where I teach introductory programming using Python.  What
> I would love to have is for the students to go through a lot of very small programs,
> to learn the basic programming structure.  Things like, return the maximum in a list,
> making lists with certain patterns, very simple string parsing, etc.  Unfortunately,
> it takes a lot of time to grade such things by hand, so I would like to automate it
> as much as possible.
>
> I envision a number of possible solutions.  In one solution, I provide a function
> template with a docstring, and they have to fill it in to past a doctest.  Is there a
> good (and safe) way to do that online?  Something like having a student post code,
> and the doctest returns.  I'd love to allow them to submit until they get it, logging
> each attempt.

On a different matter, coding style, you could run something such as
Pylint on submitted codes and penalize them based on the number of
warnings emitted.
Maybe some adjustments would be necessary -- my experience with picky
compilers is that most but not ALL warnings indicate problems.




More information about the Python-list mailing list