Programming in Python - Unit III

Programming in Python - Unit III

University

30 Qs

quiz-placeholder

Similar activities

Python Programming Quiz

Python Programming Quiz

University

25 Qs

Mastering Python Basics

Mastering Python Basics

University

30 Qs

Programming Logic & Design

Programming Logic & Design

KG - University

28 Qs

PYTHON CONTEST

PYTHON CONTEST

University

25 Qs

Takeshi's Castle Code bingo

Takeshi's Castle Code bingo

University

25 Qs

Coding Master Contest

Coding Master Contest

University

30 Qs

Script_programming_test

Script_programming_test

University

25 Qs

Python программалау тілі бойынша тест тапсырмалары

Python программалау тілі бойынша тест тапсырмалары

University

26 Qs

Programming in Python - Unit III

Programming in Python - Unit III

Assessment

Quiz

Computers

University

Hard

Created by

MS.SHYAMALADEVI C

Used 6+ times

FREE Resource

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

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?