A function is a piece of code that takes an input in the form of a parameter, processes it, and then returns the value. In one of my examples I used my dogs as the input.