0% found this document useful (0 votes)
2 views1 page

Creating and Using Python Modules

The document discusses Python modules which are files containing Python code that can be imported and used in other Python programs. It provides examples of built-in modules like math and statistics and how to create custom modules by saving Python code in a file.

Uploaded by

Brahma Raju
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views1 page

Creating and Using Python Modules

The document discusses Python modules which are files containing Python code that can be imported and used in other Python programs. It provides examples of built-in modules like math and statistics and how to create custom modules by saving Python code in a file.

Uploaded by

Brahma Raju
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

21:21 .

Sign in to edit and save changes to this..

wndt are ytnon Miodules?

axtension containing Python code that can be

mported inside another Python Program.

How to create Python Modules?

To create a module, we have to save the

code that we wsn d

file becomes the name of the module.

Advantages of Modules

usabil
Working with modules makes the code

implicsy
roblem rather than focusing on theentire

hat helps to avoid collisions between identifiers.

Fytnon Bunt-in Modules

Jprint) and input()for /o,


JNumber conversion functions such as int(),

, complexl),

JData type conversions such as list(), tuplel),

set(, etc.

lathModule

Kepresentation functions,

LogarithmicTunctions,
COnvei

File pyshell403", line 1, i n <module>

ss importtmath '15 ne tined

Tracebac me1425,
yshels 1ne 1, in cmodule
653589793

mport math
>>> math.e 459045

gee

100140

[Link](@.52398759

15q0, a p m a t c e i , naue

tatistics VOdule

Mean

*Edld

MOde

Standard Deviation

dUIUI'eametneandthe numbespyesentinaist

Median
etodretursthe midevalbe cfnunerc as pe
ar Fvamnle

[Link](|143,82)

[Link]| 1,2,8,9)

For Example,

sttistics, modell2.5,3

Standard Devation
I s 0 0 6 g S g e nte indak

Or Example,

[Link](1,15,225,354455)

You might also like