Functions allow programmers to reuse code and avoid repetition. They are defined by giving a name to a set of statements, which can then be called elsewhere in the program. Functions may take parameters, which are values supplied to the function that it can then use. For example, a shopping function could take a list as a parameter so that it can output instructions to buy the items on that list, with the list changing each time the function is called.