Search Header Logo

Python Libraries and Modules Quiz

Authored by Ahmed Abdallah

Computers

12th Grade

Used 1+ times

Python Libraries and Modules Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

16 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a library in Python?

A built-in function

A type of variable

A collection of modules

A collection of functions only

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What file extension is used for Python modules?

.lib

.py

.txt

.mod

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a built-in module in Python?

stringify

datetime

physics

randomize

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the now() function of the datetime class return?

The current date only

The current time only

The current timezone

The current date and time

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the strftime() function?

To import modules

To format date and time

To get the current date

To calculate time differences

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a package in Python?

A built-in function

A collection of related modules

A type of variable

A single module

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the first step in creating a module?

Import the module

Create a Python file with .py extension

Create a function

Create a folder

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?