0% found this document useful (0 votes)
3 views3 pages

Python Math Module Import Methods

This document discusses different ways to import modules in Python including importing the entire module, importing specific attributes from a module, importing all items from a module, and importing a module with an alias.

Uploaded by

imsiddhaarth
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)
3 views3 pages

Python Math Module Import Methods

This document discusses different ways to import modules in Python including importing the entire module, importing specific attributes from a module, importing all items from a module, and importing a module with an alias.

Uploaded by

imsiddhaarth
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

SIDDHAARTH S

23I361

PYTHON ASSIGNMENT

FIBONACCI SERIES:
COMMAND:

OUTPUT:

DIFFERENT WAYS TO IMPORT MODULE:


i) IMPORT THE ENTIRE MODULE:
SYNTAX:
import module_name
COMMAND:

OUTPUT:
SIDDHAARTH S
23I361

ii) IMPORTING SPECIFIC ATTRIBUTES FROM A MODULE:


SYNTAX:
from module_name import function_name,variable_name
COMMAND:

OUTPUT:

iii) IMPORT ALL ITEMS FROM A MODULE:


SYNTAX:
from module_name import*
COMMAND:

OUTPUT:
SIDDHAARTH S
23I361

iv) IMPORT A MODULE WITH AN ALIAS:

SYNTAX:
import module_name as alias
COMMAND:

OUTPUT:

v) IMPORT SPECIFIC ATTRIBUTES FROM MODULE WITH AN


ALIAS:

SYNTAX:
from module_name import function_name as alias
COMMAND:

OUTPUT:

You might also like