Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
59 views

Mod4Numpy Assignment

This document outlines tasks for a Python for Data Science Certification Course module on NumPy. The tasks include: 1) Creating a 3x3 matrix array with values from 2-10; 2) Converting an integer array to float type; 3) Appending values to the end of an array; 4) Adding elements of two arrays and storing in a sum array; 5) Extracting the 1st row and last element from a 3x3 array with values from 10-90. The tasks involve common NumPy operations like array creation, type conversion, appending, adding, and extracting elements.

Uploaded by

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

Mod4Numpy Assignment

This document outlines tasks for a Python for Data Science Certification Course module on NumPy. The tasks include: 1) Creating a 3x3 matrix array with values from 2-10; 2) Converting an integer array to float type; 3) Appending values to the end of an array; 4) Adding elements of two arrays and storing in a sum array; 5) Extracting the 1st row and last element from a 3x3 array with values from 10-90. The tasks involve common NumPy operations like array creation, type conversion, appending, adding, and extracting elements.

Uploaded by

priyanka bhasin
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 4: Numpy Assignment

Problem Statement:

You work in XYZ Corporation as a Data Analyst. Your corporation has told you to use the numpy
package and do some tasks related to that:

Tasks to be performed:

1. Create a 3x3 matrix array with values ranging from 2 to 10.

2. Create a numpy array having user input values and convert the integer type to the float type
of the elements of the array. For instance:

Original array

[1, 2, 3, 4]

Array converted to a float type:

[ 1. 2. 3. 4.]

3. Write a Numpy program to append values to the end of an array. For instance:

Original array:

[10, 20, 30]

After append values to the end of the array:

[10 20 30 40 50 60 70 80 90]

4. Create two numpy arrays and add the elements of both the arrays and store the result in
sumArray.

5. Create a 3*3 array having values from 10-90(interval of 10) and store that in array1. Perform
the following tasks:

a. Extract the 1st row from the array.

b. Extract the last element from the array.

support@intellipaat.com - +91-7022374614 - US: 1-800-216-8930 (Toll Free)

You might also like