0% found this document useful (0 votes)
2 views

Programming in Python - - Unit 10 - Week 10 (Contents) _ Python Modules

The document outlines the contents and assessments for a Python programming course, specifically focusing on Python modules in Week 10. It includes various questions related to Python modules, such as their purpose, how to import them, and specific functions associated with them. The document also indicates submission deadlines and scores for completed assignments.

Uploaded by

rvseceprint
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Programming in Python - - Unit 10 - Week 10 (Contents) _ Python Modules

The document outlines the contents and assessments for a Python programming course, specifically focusing on Python modules in Week 10. It includes various questions related to Python modules, such as their purpose, how to import them, and specific functions associated with them. The document also indicates submission deadlines and scores for completed assignments.

Uploaded by

rvseceprint
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

4/23/24, 3:20 AM Programming in Python - - Unit 10 - Week 10 (Contents) : Python Modules

(https://swayam.gov.in) (https://swayam.gov.in/nc_details/CEC)

[email protected]

CEC (https://swayam.gov.in/explorer?ncCode=CEC) » Programming in Python (course)

Course Assessment-10-2024
outline The due date for submitting this assignment has passed.
Due on 2024-04-19, 23:59 IST.
Week 1 Score: 10/10=100%
(Contents) :
Planning the
Computer Assignment submitted on 2024-04-14, 20:44 IST
Program () 1) What is a Python module? 1 point

Week 2
(Contents):
Techniques A built-in data type
of Problem
Solving () A collection of functions and variables

A method to define classes


Week 3
(Contents):
A way to perform mathematical operations
Introduction
to Python () Yes, the answer is correct.
Score: 1
Week 4 Accepted Answers:
(Contents): A collection of functions and variables
Conditional
Statements 2) What is the purpose of the init.py file in a Python package? 1 point
and Looping
()

It is used to define the package structure.


Week 5
(Contents):
String It is used to make Python treat the directory as a package.
Manipulation
() It is used to specify the version of the package.

https://onlinecourses.swayam2.ac.in/cec24_cs01/unit?unit=56&assessment=101 1/5
4/23/24, 3:20 AM Programming in Python - - Unit 10 - Week 10 (Contents) : Python Modules

Week 6
It is used to specify the dependencies of the package.
(Contents):
Introduction
to list. () Yes, the answer is correct.
Score: 1
Accepted Answers:
Week 7
It is used to make Python treat the directory as a package.
(Content):
Introduction 3) Which keyword is used to import a module in Python? 1 point
to tuples. ()

Week 8
include
(Contents):
Introduction
to
dictionaries using
()

import
Week 9
(Contents):
Python
require
Functions ()

Week 10 Yes, the answer is correct.


(Contents) : Score: 1
Python Accepted Answers:
Modules () import

Lecture 1:
Introduction to 4) Which module is used to work with dates and times in Python? 1 point
Module (unit?
unit=56&lesso
n=57)
time
Lecture 2:
Importing
Module &
datetime
Working with
module and
packages.
(unit? date
unit=56&lesso
n=58)
timestamp
Lecture 3:
Practical
Examples Yes, the answer is correct.
(unit? Score: 1
unit=56&lesso Accepted Answers:
n=59) datetime

Lecture
Material (unit?
unit=56&lesso 5) What does the dir() function do in Python? 1 point
n=60)

https://onlinecourses.swayam2.ac.in/cec24_cs01/unit?unit=56&assessment=101 2/5
4/23/24, 3:20 AM Programming in Python - - Unit 10 - Week 10 (Contents) : Python Modules

Quiz:
Assessment- Displays the contents of a directory
10-2024
(assessment?
name=101) Lists all the functions and variables in a module

Week 11
(Contents): Deletes a directory
Input-Output
()
Changes the current directory
Week 12
(Contents):
Yes, the answer is correct.
Exception
Score: 1
Handling ()
Accepted Answers:
Lists all the functions and variables in a module

6) What is the purpose of the os module in Python? 1 point

To perform operating system related tasks

To handle mathematical operations

To manipulate strings

To work with dates and times

Yes, the answer is correct.


Score: 1
Accepted Answers:
To perform operating system related tasks

7) Which statement correctly describes how to access a function my_function() from a 1 point
module named my_module?

my_module.my_function()

import my_module.my_function

import my_function from my_module

my_module.my_function

https://onlinecourses.swayam2.ac.in/cec24_cs01/unit?unit=56&assessment=101 3/5
4/23/24, 3:20 AM Programming in Python - - Unit 10 - Week 10 (Contents) : Python Modules

Yes, the answer is correct.


Score: 1
Accepted Answers:
my_module.my_function()

8) The________ statement is used to import sqrt and cos function from the math 1 point
module.

import math

from import math

sqrt,cos import from math

from math import sqrt, cos

Yes, the answer is correct.


Score: 1
Accepted Answers:
from math import sqrt, cos

9) Which keyword is used to import a module and rename it in Python? 1 point

import
from
as
module

Yes, the answer is correct.


Score: 1
Accepted Answers:
as

10) What is the output of the following code? 1 point


import math
print(math.ceil(3.2))

3
4
3.0
4.0
Yes, the answer is correct.
Score: 1
Accepted Answers:
4

https://onlinecourses.swayam2.ac.in/cec24_cs01/unit?unit=56&assessment=101 4/5
4/23/24, 3:20 AM Programming in Python - - Unit 10 - Week 10 (Contents) : Python Modules

You were allowed to submit this assignment only once.

https://onlinecourses.swayam2.ac.in/cec24_cs01/unit?unit=56&assessment=101 5/5

You might also like