Module-mcqs

Module-mcqs

University

20 Qs

quiz-placeholder

Similar activities

Kuis Dadakan ;)

Kuis Dadakan ;)

10th Grade - University

15 Qs

Mac Fundamentals

Mac Fundamentals

University

20 Qs

Python Quiz For Starters

Python Quiz For Starters

3rd Grade - Professional Development

17 Qs

Multimedia Video & Animation

Multimedia Video & Animation

University

20 Qs

Django-quiz

Django-quiz

5th Grade - University

20 Qs

Pythonintro

Pythonintro

University

15 Qs

C - Structures

C - Structures

University

20 Qs

DreamWeaver CS6

DreamWeaver CS6

University

20 Qs

Module-mcqs

Module-mcqs

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

Rushika Patt

FREE Resource

AI

Enhance your content in a minute

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

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

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