Module in Python

Module in Python

University

15 Qs

quiz-placeholder

Similar activities

Data Science Quiz

Data Science Quiz

University

12 Qs

Algoritma dan Pemrograman Bab 1

Algoritma dan Pemrograman Bab 1

University

15 Qs

python test 1_23_24

python test 1_23_24

University

10 Qs

Principles of Programming

Principles of Programming

KG - University

13 Qs

Python exam preparation

Python exam preparation

University

18 Qs

QUIZ BASIC NETWORK

QUIZ BASIC NETWORK

University

15 Qs

AWS Cloud Storage

AWS Cloud Storage

University

10 Qs

Quizz_Algoritma, Pemrograman, dan RPL_Accifence

Quizz_Algoritma, Pemrograman, dan RPL_Accifence

University

10 Qs

Module in Python

Module in Python

Assessment

Quiz

Computers

University

Practice Problem

Easy

Created by

Chi Quang

Used 2+ times

FREE Resource

AI

Enhance your content in a minute

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

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the main purpose of using modules in Python?

To avoid using classes
To write programs in Java
To organize reusable code in separate files
To increase the speed of the Python interpreter

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will the following code output? import math print(math.pi

3.14159…
math.pi
Error
PI

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following imports only the sqrt function from the math module?

import math.sqrt
from math import sqrt
import sqrt from math
import sqrt

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the effect of using an alias when importing a module in Python?

It hides the module
It speeds up execution
It gives the module a shorter name
It disables built-in functions

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Why is “from math import *” discouraged in large programs?

It increases performance
It increases typing
It can cause name conflicts
It hides the source of code

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens if you try to import a module that doesn’t exist?

The program continues silently
A warning is shown
An ImportError is raised
A file is created

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these commands installs the virtualenv tool using pip?

pip load virtualenv
pip get virtualenv
pip install virtualenv
install virtualenv pip

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