Machine Don

What is function?

A named recipe, written once. It takes in values, does the work, and gives back a result. In Python, it starts with def and hands back the result with return.

Also called: functions.

An analogy

The rule for splitting delivery fees, written on an index card: you run all forty deliveries through the same card instead of redoing the math forty times.

Where it shows up in the course

Related terms