Module-mcqs

Module-mcqs

University

20 Qs

quiz-placeholder

Similar activities

2.2.1 d Procedures and Functions

2.2.1 d Procedures and Functions

University

20 Qs

Implementation & Maintenance Phase ASAD

Implementation & Maintenance Phase ASAD

University

15 Qs

PAP Module-3 Part3

PAP Module-3 Part3

University

15 Qs

Python функциялары  7 сынып

Python функциялары 7 сынып

12th Grade - University

15 Qs

CETA'S Quizzard

CETA'S Quizzard

University

20 Qs

Output Quiz-9

Output Quiz-9

University

20 Qs

QUIZZY FIZZY 4

QUIZZY FIZZY 4

University

15 Qs

Counters

Counters

University

15 Qs

Module-mcqs

Module-mcqs

Assessment

Quiz

Computers

University

Hard

Created by

Rushika Patt

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What is a Python module?
A collection of classes
A file containing Python definitions and statements
A built-in Python function
A compiled program

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

How do you import a module in Python?
import module_name
include module_name
use module_name
attach module_name

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What is the purpose of the __name__ variable in a module?
It stores the module’s filename
It determines whether the module is run as a script or imported
It contains all function names in the module
It is a built-in Python function

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

How can you import only a specific function from a module?
import module_name.function_name
from module_name import function_name
include module_name.function_name
use module_name.function_name

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What happens if a module is imported multiple times in the same program?
It will be reloaded every time
It will be ignored after the first import
It will cause an error
It will slow down the program

6.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

How do you get a list of all functions and variables defined in a module?
list(module_name)
module_name.show()
dir(module_name)
help(module_name)

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does 'from module import *' do?
Imports all functions and variables from the module
Imports only public functions
Imports only classes
Imports only built-in functions

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?