4
AssignmentMultiple Select

Unit Test

Question 4 • VA-Information Technology Fundamentals B

Which of the following correctly defines a function in computer programming? Choose all the apply.

Answer
A
a code block that performs a single task
B
a code block that returns a value
C
a value that can be used anywhere in a code block
D
data in code that is passed into a parameter

Explanation

A function is a reusable block of code designed to perform a task, so choice A is correct. Some functions also return a value, which makes choice B another valid description. A value used within a code block is not what defines a function, and data passed into a parameter is an argument, not a function itself.

AI-written and checked against the verified answer.

Previous
Next