U2L3 #1 [Writing Functions]

U2L3 #1 [Writing Functions]

Assessment

Flashcard

Computers

12th Grade

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 this code snippet correctly define and call the function?

Media Image

Back

Yes, this code snippet correctly defines and calls the function.

2.

FLASHCARD QUESTION

Front

Does this code snippet correctly define a function?

Media Image

Back

This code snippet has an error.

Answer explanation

You do not begin a function definition with the word function. You start the definition of a function with func.

3.

FLASHCARD QUESTION

Front

Does this code snippet correctly define a function?

Media Image

Back

Yes, this code snippet correctly defines a function.

4.

FLASHCARD QUESTION

Front

Does this code snippet correctly define and call the function?

Media Image

Back

Yes, this code snippet correctly defines and calls the function.

5.

FLASHCARD QUESTION

Front

Does this code snippet correctly define and call the function?

Media Image

Back

This code snippet has an error.

Answer explanation

This attempts to pass parameters to a function that accepts no parameters.

6.

FLASHCARD QUESTION

Front

Does this code snippet correctly define and call the function?

Media Image

Back

Yes, this code snippet correctly defines and calls the function.

7.

FLASHCARD QUESTION

Front

Does this code snippet correctly define and call the function?

Media Image

Back

This code snippet has an error.

Answer explanation

This is invalid because id is not defined anywhere.

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?