Search Header Logo

Programming in Python - Unit III

Authored by MS.SHYAMALADEVI C

Computers

University

Used 8+ times

Programming in Python - Unit III
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

30 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a module in Python?

A built-in Python function

A collection of related classes and functions

A way to import external libraries

A file containing Python code that can be imported and used

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which module provides mathematical functions and constants in Python?

math

random

os

sys

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you import a module named my_module in Python?

import my_module

import module.my_module

from my_module import *

import my_module as mm

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the sys.path variable represent in Python?

     

The path of the Python interpreter

The current working directory

The list of directories Python searches for modules

The path to the Python standard library

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a namespace in Python?

A region where a variable is stored

A keyword used for defining classes

A unique identifier for a variable

A container for holding variables and functions

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the dir() function do in Python?

Lists all available modules in Python

Returns the names in the current local scope or a module's attributes

Lists all built-in functions in Python

Checks if a variable is defined in the local scope

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which module should be imported to use the reload() function in Python 3.x?

reload

importlib

imp

sys

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