Lesson 22: Function — A Reusable Code Block
A function is a named block of code we can run again and again. We define it with def, and call it by its name.
Imagine a button on a coffee machine. def creates the button, calling the function presses it.
- def
- The keyword to define a function.
- function call
- Running a function by its name: name().