Search Header Logo

Unit 9

Authored by Lisa Genua

Computers

8th Grade

Used 1+ times

Unit 9
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

11 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

Media Image
Media Image
Media Image
Media Image

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to call a function named print_sum?

def print_sum()

print_sum

print_sum()

print_sum():

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following code samples correctly passes the number 10 as an argument to the function print_number?

print_number(10)

print_number()

print(10)

10(print_number)

print print_number

print 10

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

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

function namespace

global namespace

object namespace

class namespace

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

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

function namespace

global namespace

object namespace

class namespace

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

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
Media Image
Media Image
Media Image

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

Media Image
Media Image
Media Image
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?