Search Header Logo

Python Function Quiz

Authored by Jhunel Peñaflorida

Computers

University

Used 6+ times

Python Function Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 2 pts

Media Image

What does the following function returns?

1 2 3 10

1 2 5 4

1 2 3 4

Syntax Error

2.

MULTIPLE CHOICE QUESTION

45 sec • 2 pts

Media Image

What does the following function returns?

6

13

16

Syntax Error

3.

MULTIPLE CHOICE QUESTION

45 sec • 2 pts

Media Image

What does the following function returns?

"abc"

"ab"

True

Syntax Error

4.

MULTIPLE CHOICE QUESTION

45 sec • 2 pts

Media Image

Which of the following is an invalid function call?

greet("Sam")

greet("Sam", "Hello")

greet(msg="Hello", "Sam")

greet(name="Sam")

5.

MULTIPLE CHOICE QUESTION

45 sec • 2 pts

Media Image

What's the output of this function?

[1, 2, 3, 4]

[1, 2]

Error

[3, 4]

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used to define a function in Python?

function

def

define

func

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will this function return?

Hello

hello

greet

Error

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?