Unit 9

Unit 9

Assessment

Flashcard

Computers

8th Grade

Hard

Created by

Quizizz 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?

Back

global namespace

5.

FLASHCARD QUESTION

Front

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

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?

Back

Media Image

7.

FLASHCARD QUESTION

Front

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

Back

Media Image

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?