Authoring a code correctness problem using Python