U2L3 #3 [Functions Returning values]

U2L3 #3 [Functions Returning values]

Assessment

Flashcard

Created by

Harold Peaden

Computers

University

1 plays

Easy

Student preview

quiz-placeholder

12 questions

Show all answers

1.

FLASHCARD QUESTION

Front

Does the code correctly create a function that returns a value?

Back

This code correctly creates a function that returns a value.

2.

FLASHCARD QUESTION

Front

Does the code correctly create a function that returns a value?

Back

This code correctly creates a function that returns a value.

3.

FLASHCARD QUESTION

Front

Does the code correctly create a function that returns a value?

Back

There is an error in this code.

Answer explanation

This tries to return a value from a function that does not specify to expect a return type.

4.

FLASHCARD QUESTION

Front

Does the code correctly create a function that returns a value?

Back

There is an error in this code.

Answer explanation

This attempts to return a Boolean when it should return an integer.

5.

FLASHCARD QUESTION

Front

Does the code correctly create a function that returns a value?

Back

There is an error in this code.

Answer explanation

This does not return a value if color is not "tartan"

6.

FLASHCARD QUESTION

Front

Does the code correctly create a function that returns a value?

Back

This code correctly creates a function that returns a value.

7.

FLASHCARD QUESTION

Front

Does the code correctly create a function that returns a value?

Back

This code correctly creates a function that returns a value.

Explore all questions with a free account

or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?