Unit 9

Unit 9

Assessment

Flashcard

Computers

8th Grade

Practice Problem

Hard

Created by

Wayground Content

FREE Resource

Student preview

quiz-placeholder

11 questions

Show all answers

1.

FLASHCARD QUESTION

Front

Which of the following is the correct way to declare a function in python?

Back

Media Image

2.

FLASHCARD QUESTION

Front

What is the correct way to call a function named print_sum? Options: def print_sum(), print_sum, print_sum(), print_sum():

Back

print_sum()

3.

FLASHCARD QUESTION

Front

Which of the following code samples correctly passes the number 10 as an argument to the function print_number? Options: print_number(10), print_number(), print(10), 10(print_number), print print_number, print 10

Back

print_number(10)

4.

FLASHCARD QUESTION

Front

In which namespace is the variable x defined in the program on the left?

Media Image

Back

global namespace

5.

FLASHCARD QUESTION

Front

In which namespace is the variable y declared in the function on the left?

Media Image

Back

function namespace

6.

FLASHCARD QUESTION

Front

Consider the code snipped on the left: Which of the following additional functions could be safely added to this code, without causing an error?

Media Image

Back

Media Image

7.

FLASHCARD QUESTION

Front

Which of the following functions successfully returns double the variable ‘number’?

Back

Media Image

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?