[Tutor] programming exercise in Python

Danny Yoo dyoo at hkn.eecs.berkeley.edu
Wed Aug 9 17:00:55 CEST 2006

On Wed, 9 Aug 2006, Kermit Rose wrote:

> I've written tenative code for the incr routine.
> Now to test and possibly debug it.

Just as a note: it's usually a much better idea to write your test cases 
first, even before writing any code.  It'll give you a better idea of what 
you want your function to do.

(It'll also probably give the other here a better idea of what the 
function is supposed to do.  I myself don't quite know either what it's 
supposed to do based solely on the description.  *grin*)

What are some small test cases you're thinking of for this function?

More information about the Tutor mailing list