Functions, Procedures, Arguments and Parameters Answers

4 verified answers
2
Free Preview

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

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
3
Free Preview

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

A
a code block that performs a single task
B
a value that can be used anywhere in a code block
C
a code block programmers can reuse multiple times
D
data in code that is passed into a parameter
4

Question text not available

Answers:
Selection 1:A local variable
Selection 2:A variable
Selection 3:A global variable
5

Which of the following are advantages of using subroutines? Choose all that apply.

A
Subroutines return multiple variables when used as a function.
B
Subroutines allow the programmer to save time.
C
Subroutines eliminate duplicate code.
D
Subroutines provide a fixed value that cannot be changed.

Did you find these answers helpful?