Autopython: A simple methodology for autocorrecting student-written python programs

Mihalis Kolountzakis

Department of Mathematics and Applied Mathematics, University of Crete, Greece

We describe here a very simple method that enables us to autocorrect student submitted python programs, in the context of a first programming course at University level.

This method is not automated as much as it could be, but it is very easy to set up and extremely flexible.

Each assigned problem (program to be written) is created by the teacher in one directory. This directory will contain three files, at least:, and
The first file is to be hidden from the students who must download the last two files for each problem, in an empty directory.

One can see two examples of such problems at

histogram and robot.

The roles of the three files are as follows (see at the above two example problem directories for more detail):

The workflow of the student is as follows:

For correction the teacher adds one or two more cases to his copy of the tester (to defeat students who might cheat by looking into their tester and make their program return the corresponding outputs for each value of the input listed in there) and uses a script to apply the tester to each submitted program and record the results to a file or database.