Python Functions Quiz

Python Functions Quiz

University

50 Qs

quiz-placeholder

Similar activities

DDPTJKT - Latihan Soal PTS Genap

DDPTJKT - Latihan Soal PTS Genap

10th Grade - University

50 Qs

JAVASCRIPT LONG

JAVASCRIPT LONG

University

55 Qs

2ºDAW - Diseño de Interfaces Web - Trim.2 - Prof. C. Boni

2ºDAW - Diseño de Interfaces Web - Trim.2 - Prof. C. Boni

University - Professional Development

50 Qs

Compro Quiz#1

Compro Quiz#1

University

51 Qs

TEST - Guía de estudios Excel 2p c3 25 - INFORMATICA 1

TEST - Guía de estudios Excel 2p c3 25 - INFORMATICA 1

11th Grade - University

51 Qs

Power Point – Wiputra Cendana

Power Point – Wiputra Cendana

University

46 Qs

Algoritmika 1.

Algoritmika 1.

10th Grade - University

50 Qs

CONTROL SYSTEMS UNIT I

CONTROL SYSTEMS UNIT I

University

45 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()

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?

Discover more resources for Computers