Python Functions and Modules Quiz

Python Functions and Modules Quiz

University

22 Qs

quiz-placeholder

Similar activities

ICT Unit-2

ICT Unit-2

University

20 Qs

Quiz Harian Gdevelop MPK

Quiz Harian Gdevelop MPK

University

20 Qs

Kuis Pemrograman Dasar

Kuis Pemrograman Dasar

University

20 Qs

Archivos

Archivos

University

17 Qs

Algoritma Pemrograman

Algoritma Pemrograman

University

20 Qs

3D Objects - Terms & Transfomations

3D Objects - Terms & Transfomations

6th Grade - Professional Development

20 Qs

AI Exam

AI Exam

University

17 Qs

Digital and Analog transmission

Digital and Analog transmission

University

20 Qs

Python Functions and Modules Quiz

Python Functions and Modules Quiz

Assessment

Quiz

Computers

University

Practice Problem

Medium

Created by

Krishndeo Pawar

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...

22 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What keyword is used to define a function in Python?

func

def

function

define

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is NOT a type of function parameter in Python?

Keyword arguments

Default arguments

Static arguments

Variable-length arguments

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the purpose of the return statement in a function?

To return result from the function

To call another function

To print output

To define parameters

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following modules is used for mathematical functions in Python?

datetime

random

os

math

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What does the lambda keyword create in Python?

Static methods

Named functions

Global variables

Anonymous functions

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is a valid way to import a module in Python?

load module_name

require module_name

include module_name

import module_name

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output of the following code: print(sum(10, 20)) if sum is defined as def sum(a, b): return a + b?

10

Error

20

30

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