U2L3 #6 [Functions - Default Parameters]

U2L3 #6 [Functions - Default Parameters]

Assessment

Flashcard

Computers

University

Hard

Created by

Quizizz Content

FREE Resource

Student preview

quiz-placeholder

8 questions

Show all answers

1.

FLASHCARD QUESTION

Front

In this first section of code, how many parameters does this function require?

Back

2

2.

FLASHCARD QUESTION

Front

In this first section of code, "person" is being used as the external or internal reference?

Back

In this code, "person" is being used as the internal reference.

3.

FLASHCARD QUESTION

Front

In this first section of code, does "person" have a default value?

Back

"person" does not have a default value.

4.

FLASHCARD QUESTION

Front

In this first section of code, what is the default value of "person"?

Back

"person" will have a default value of nil.

5.

FLASHCARD QUESTION

Front

In this first section of code, what is the default value of "nicely"?

Back

"nicely" will have a default value of true.

6.

FLASHCARD QUESTION

Front

In this first section of code, what is the minimum number of parameter values that must be given when this function is called?

Back

1

7.

FLASHCARD QUESTION

Front

In this first section of code, what is the maximum number of parameter values that can be given when this function is called? Options: 1, 2, 3, 4

Back

2

8.

FLASHCARD QUESTION

Front

Which call to calculateArea is valid?

Back

Media Image

Answer explanation

This function has three parameters.  You must call the function in this way:


You must name the first parameter “length” and give it a Double value.


You must not name the second parameter, but you must give it a Double value.


You must name the third parameter “unit” and give it a String value.