Introduction
Functions help you group code to do a specific job. You can reuse them anytime without rewriting.
When you want to repeat a task many times with different inputs.
When you want to organize your code into small, clear parts.
When you want to test or fix one part of your code easily.
When you want to share your code with others in a simple way.