generates a string for a programming exercise