Functions, Procedures, Arguments and Parameters Answers

17 verified answers1 views
1
Free Preview

Which of the following defines code?

A
a set of instructions, written by a programmer, that is used by computers to perform tasks
B
data that a program expects to be supplied
C
a procedure that returns a value as a result
D
data that is passed to a parameter in a program
4

Which of the following are benefits of the Python programming language? Check all that apply.

A
It is free to use.
B
It saves programmers time.
C
It is known for its symbols.
D
It is relatively easy to learn.
5

Which of the following is true of a procedure? Check all that apply.

A
It can be reused.
B
It saves programmers time.
C
It is a block of code that performs a single task.
D
It lets you exit a function.
6

How is a procedure different than a function?

A
A function is a subroutine, while a procedure is a parameter.
B
A procedure and a function are the same thing.
C
A procedure returns a value, while a function does not.
D
A procedure does not return a value, while a function does.
7

What does a function return?

A
a procedure
B
a routine
C
a value
D
a subroutine
8

Question text not available

Answers:
Selection 1:keyword argument
Selection 2:default argument
Selection 3:required argument
10

Which of the following statements is true of subroutines? Check all that apply.

A
They can be used in multiple places.
B
They can be used in one place only.
C
They save a programmer time since they are reusable.
D
They can be used only once.
E
They can contribute to excessive use of a computer’s resources.
11

A subroutine may be used to refer to which of the following? Check all that apply.

A
a function
B
a subprogram
C
a procedure
D
a method
E
a variable
12

What does a constant do in relation to a value?

A
A constant causes a value to exit.
B
A constant eliminates a value.
C
A constant replaces a value.
D
A constant passes a variable to a value.

Did you find these answers helpful?