In assignments, make sure to include examples of or references to code that is essential for a program, but that students are not responsible for writing.
For example, in an introductory exercise where students draw a figure, provide simple graphics routines that they are to use, routines that hide the complexities of the full-blown graphics library that would otherwise be employed.