What is the purpose of a function in computer code?

(1 point)
Responses

to convert constants to variables

to convert constants to variables

to convert interpreters to compilers

to convert interpreters to compilers

to create a named segment of code that can be reused

to create a named segment of code that can be reused

to mark the code with notes so it is easier to debug

1 answer

The purpose of a function in computer code is to create a named segment of code that can be reused.