269,564 views
29 votes
29 votes
Write a two to three sentence response to the following question:

Name two reasons functions are useful in code and explain your response.

User Danilo Barboza
by
3.3k points

2 Answers

15 votes
15 votes

Answer:

Functions act like "capsules" for your code to be stored in.


You can write code within these capsules so that every time you want to use this code, you can simply call the function with the necessary arguments to use that code.

This means functions allow you to reuse code, whilst making your code more readable, less repetitive, and look more professional.

User Bracher
by
3.3k points
13 votes
13 votes

Answer:

Functions can be useful for many reasons, it is one of the main components to learn in writing code. Without functions code would not be where it is today.

Step-by-step explanation:

User Llazar
by
2.9k points