Python Functions Quiz

Python Functions Quiz

University

50 Qs

quiz-placeholder

Similar activities

CAD ASSESSMENT PART 1

CAD ASSESSMENT PART 1

University

45 Qs

EPA-11-DEC-2021 On Java

EPA-11-DEC-2021 On Java

University

50 Qs

Mantenimiento de Sistemas Operativos - Hardware

Mantenimiento de Sistemas Operativos - Hardware

University

47 Qs

AI Revision

AI Revision

University

50 Qs

IT Fundamentals Test Part 1

IT Fundamentals Test Part 1

KG - University

49 Qs

HTML Y CSS

HTML Y CSS

University

50 Qs

TIN HỌC 6 - ÔN TẬP GK1 2425

TIN HỌC 6 - ÔN TẬP GK1 2425

6th Grade - University

50 Qs

Networking - Practice Test #1

Networking - Practice Test #1

9th Grade - University

47 Qs

Python Functions Quiz

Python Functions Quiz

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

Vigneshwari S

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

50 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code? def greet(name): return "Hi " + name print(greet("Alex"))

Alex

Hi Alex

greet Alex

Error

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If a function has no return statement, it returns:

0

None

Empty string

Error

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used to define a function in Python?

func

def

function

define

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a function call?

def myfunc()

myfunc()

function myfunc

func myfunc

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output? def add(a, b): return a + b print(add(2, 3))

23

5

(2, 3)

Error

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Positional arguments must be:

Passed in order

Always keyword arguments

Optional always

Declared after *args

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function returns the length of a string?

size()

len()

count()

length()

Create a free account and access millions of resources

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?