U2L3 #3 [Functions Returning values]

U2L3 #3 [Functions Returning values]

Assessment

Flashcard

Computers

University

Practice Problem

Easy

Created by

Harold Peaden

Used 1+ times

FREE Resource

Student preview

quiz-placeholder

12 questions

Show all answers

1.

FLASHCARD QUESTION

Front

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

Media Image

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?

Media Image

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?

Media Image

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?

Media Image

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?

Media Image

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?

Media Image

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?

Media Image

Back

This code correctly creates a function that returns a value.

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?