Educator Resources for Functions

Coding an entire computer program often involves repeating a lot of steps. Luckily for programmers, there's a shortcut that makes the process a little easier—functions. These short pieces of code condense long series of commands, called statements, into a single term. By declaring a function at the beginning of a program, you can simply call, or execute, the function by writing its name when you need it! The process of condensing repetitive, complex code can be summed up with the acronym DRY: Don't Repeat Yourself! DRY code takes less time to program and is easier to change. Want to know more about these handy timesavers? Press "Play" to learn how coding functions, well, function!