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

Mod2Import Assignment

This document outlines tasks for a Python data analyst to practice importing functions from a module file. The analyst must create a Module.py file with addition, subtraction, multiplication, and division methods, then import and call the methods from a new file to display results. Specifically, the analyst will import and call addition and subtraction individually, and import and call multiplication and division together.

Uploaded by

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

Mod2Import Assignment

This document outlines tasks for a Python data analyst to practice importing functions from a module file. The analyst must create a Module.py file with addition, subtraction, multiplication, and division methods, then import and call the methods from a new file to display results. Specifically, the analyst will import and call addition and subtraction individually, and import and call multiplication and division together.

Uploaded by

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

Python for Data Science Certification Course

Module 2: Import Assignment

Problem Statement:

You work in XYZ Corporation as a Data Analyst. Your corporation has told you to work on
importing various functions.

Tasks to be performed:

1. Create a python file named Module.

a. Inside the file, define 4 methods named – addition, subtraction, multiplication, and
division.

b. Each method should only accept 2 arguments and should return the result of operation
performed in each method. For e.g., addition() should return the sum of two arguments.

c. Save the Module file in .py format.

2. Open a new python file and import the Module.py file.

a. Now call the 4 methods from the Module.py file, i.e., addition(), subtraction(),
multiplication(), and division().

3. From the Module file, import only the addition() and pass the arguments so that it can
display the result from the method.

4. From the Module file, import only the subtraction() and pass the arguments so that it can
display the result from the method.

5. From the Module file, import both the multiplication() and division() and pass the arguments
so that it can display the result from the methods.

[email protected] - +91-7022374614 - US: 1-800-216-8930 (Toll Free)

You might also like