Respuesta :

Answer:

The Benefits of functions in python are:

  1. Reducing duplication of code
  2. Decomposing complex problems into simpler pieces
  3. Improving clarity of the code
  4. Reuse of code
  5. Information hiding

Explanation:

Definition:

          A function is a block of reusable code that is used to perform a specific action.

There are two basic types of functions: built-in functions and user defined functions. The built-in functions are part of the Python language; for instance dir( ), len( ), or abs( ). The user defined functions are functions created with the def keyword.

Benefits:

Functions in python are among the most important concepts and constructs; here are a few reasons:

  1. They reduce code duplication in a program. By having a specific task taken care of by a nice block of packaged code that you can import and call whenever you want, you don’t need to duplicate its implementation.
  2. They help in splitting a complex task or procedure into smaller blocks, each of which becomes a function.
  3. They improve traceability.
  4. They improve readability.
  5. They hide the implementation details from their users.