Search Header Logo

python functions

Authored by Anonymous Anonymous

Computers

Professional Development

Used 32+ times

python functions
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

12 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following items are present in the function header?

function name

function name and parameter list

parameter list

return value

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the output of the following code snippet:

Welcome

Viewers

Welcome

Welcome

Viewers,Viewers,Viewers

Welcome

ViewersViewersViewers

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the output of the following code snippet?

1 3

2 3

The program has a runtime error because x and y are not defined.

3 3

3 2

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the output of the following code snippet?

3 1

3

1

The program has a runtime error because x is not defined.

3

3

1 1

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the output of the following code snippet?

4 1

4

1

The program has a runtime error because the local variable ‘num’ referenced before assignment.

4

4

4 4

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following function headers is correct?

def f(a = 1, b = 1, c = 2, d):
def f(a = 1, b = 1, c = 2):
def f(a = 1, b, c = 2):
def f(a = 1, b):

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a recursive function?

A function that that calls all the functions in the program except itself.
There is no such thing as recursive function in Python.
A function that calls itself.
A function that calls all the functions in the program.

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?