1. What is a Function?
In essence, a function:
- Encapsulates Logic: It groups a sequence of statements under a single name.
- Promotes Reusability: Once defined, you can call (execute) the function multiple times from different parts of your program without rewriting its code.
- Improves Readability: Breaks down complex tasks into smaller, manageable chunks.
- Reduces Errors: If a bug is found, you only need to fix it in one place (the function definition).