Understanding Python Modules

Understanding Python Modules

9th - 12th Grade

7 Qs

quiz-placeholder

Similar activities

Hardware Exit Ticket

Hardware Exit Ticket

9th Grade

8 Qs

Introduction to Python

Introduction to Python

9th - 12th Grade

10 Qs

Python L1 Quiz 5: Random Numbers and More Turtle Features

Python L1 Quiz 5: Random Numbers and More Turtle Features

1st - 12th Grade

10 Qs

Python Charts - Line chart

Python Charts - Line chart

12th Grade

8 Qs

Basic Programming Terminology Quiz

Basic Programming Terminology Quiz

10th Grade

10 Qs

Parts of a Gaming PC

Parts of a Gaming PC

12th Grade

10 Qs

Slip Test

Slip Test

12th Grade

10 Qs

Python Projects Quiz

Python Projects Quiz

6th Grade - University

11 Qs

Understanding Python Modules

Understanding Python Modules

Assessment

Quiz

Computers

9th - 12th Grade

Hard

Created by

Angelito Villalon

FREE Resource

7 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What keyword is used to import a module in Python?

require

include

import

use

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which module contains functions for mathematical operations?

math

time

random

os

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you pause a program for 5 seconds?

time.pause(5)

time.wait(5)

time.delay(5)

time.sleep(5)

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function generates a pseudo-random integer between two bounds?

random.between()

random.randint()

random.int()

random.range()

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you rename a module at import with a different name for easier reference?

import math to m

import math is m

import math rename m

import math as m

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a correct way to directly import a function from a module?

from module import function

include module.function

import function from module

require module.function

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to generate a pseudo-random number greater than or equal to 0 and less than 1?

random.float(0, 1)

random.random()

random.int(0, 1)

random.range(0, 1)