Which term is a named, reusable group of programming instructions?

Prepare for the Code.org Computer Science Discoveries test. Study with interactive quizzes and comprehensive explanations. Master key concepts and boost your confidence!

Multiple Choice

Which term is a named, reusable group of programming instructions?

Explanation:
A function is a named, reusable block of programming instructions. You define it once and can run that same group of steps anywhere in your program by calling its name. Functions can take inputs, called parameters, so they can work with different data, and they can return a value when they finish. This reuse and modularity help keep code organized and avoid repeating the same steps. By comparison, an expression is just a single calculation that yields a value, not a whole block of instructions you can reuse, and a boolean is simply a true/false value.

A function is a named, reusable block of programming instructions. You define it once and can run that same group of steps anywhere in your program by calling its name. Functions can take inputs, called parameters, so they can work with different data, and they can return a value when they finish. This reuse and modularity help keep code organized and avoid repeating the same steps. By comparison, an expression is just a single calculation that yields a value, not a whole block of instructions you can reuse, and a boolean is simply a true/false value.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy