Introduction
Functions help organize code into small tasks. Understanding how they run step-by-step makes your programs work correctly.
When you want to run a set of instructions multiple times.
When you need to break a big problem into smaller parts.
When you want to reuse code without rewriting it.
When you want to control the order in which your code runs.
When you want to get a result back from a set of instructions.