Python Function Quiz

Python Function Quiz

University

15 Qs

quiz-placeholder

Similar activities

OOPS-1

OOPS-1

University

20 Qs

C++ public single inheritance

C++ public single inheritance

University

12 Qs

Python 101

Python 101

University

15 Qs

Python Round 2

Python Round 2

University

10 Qs

Functions in Python

Functions in Python

University

15 Qs

PYTHON FUNCTION

PYTHON FUNCTION

University

20 Qs

PYTHON PROGRAMMING Q4 FUNCTIONS

PYTHON PROGRAMMING Q4 FUNCTIONS

University

20 Qs

Understanding Python Functions

Understanding Python Functions

University

20 Qs

Python Function Quiz

Python Function Quiz

Assessment

Quiz

Computers

University

Hard

Created by

Jhunel Peñaflorida

Used 5+ times

FREE Resource

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

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?