Functions

Functions

Python (and most languages) have a way to wrap code up so it can be called repeatedly: functions.

A function is a piece of code with a name. Other code calls the function when it wants something done.

Let's take the name tag program we wrote at the beginning of the course.