Module in Python

Module in Python

University

15 Qs

quiz-placeholder

Similar activities

Django-quiz

Django-quiz

5th Grade - University

20 Qs

Practica Diseño y Programacion Web III

Practica Diseño y Programacion Web III

University

15 Qs

Data Visualization

Data Visualization

10th Grade - University

12 Qs

8-mavzu. Python va MySQLda ma’lumot kiritish va tahrirlash

8-mavzu. Python va MySQLda ma’lumot kiritish va tahrirlash

University

18 Qs

Hadoop

Hadoop

University

20 Qs

Python Programming 17.09.2021

Python Programming 17.09.2021

University

15 Qs

Python ir Colab

Python ir Colab

University

17 Qs

Monday Night Quiz 3/15

Monday Night Quiz 3/15

University

10 Qs

Module in Python

Module in Python

Assessment

Quiz

Computers

University

Easy

Created by

Chi Quang

Used 2+ times

FREE Resource

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

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?