Search Header Logo

Python Functions

Authored by Thomas Martinez

Computers

10th - 12th Grade

Python Functions
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

28 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

How do you correctly call this function

def(1)
x=square( )
defSquare(4)
x=square(5)

2.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

What will print?

nothing
sayHi()
an error message
hi there

3.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

What will print?

nothing
5
6
an error message

4.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

What will print?

nothing
5
6
an error message

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

Which of the following best describes the order in which these lines are processed in Python?

4, 1, 2
4, 2, 1
1, 2, 3, 4
3, 1, 2

6.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

Which statement is the function definition?

def square(x):

return a

a = pow(x,2)

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Tells the interpreter that the code which follows is a function

const
int
def
while

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?