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

Assignment 2 – NumPy

The document outlines an assignment for a Data Analyst at XYZ Corporation involving the use of the NumPy package. Tasks include creating and manipulating arrays, converting data types, appending values, and performing basic operations on arrays. Specific tasks involve creating a 3x3 matrix, converting user input to float, and extracting elements from arrays.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Assignment 2 – NumPy

The document outlines an assignment for a Data Analyst at XYZ Corporation involving the use of the NumPy package. Tasks include creating and manipulating arrays, converting data types, appending values, and performing basic operations on arrays. Specific tasks involve creating a 3x3 matrix, converting user input to float, and extracting elements from arrays.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

t

aa
Module 4: NumPy Assignment
lliP
te
In

Contact us: [email protected] / © Copyright Intellipaat / All rights reserved


Python for Data Science Certification Course

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.]

t
3. Write a NumPy program to append values to the end of an array. For

aa
instance: Original array: [10, 20, 30] . After that, 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 3x3 array having values from 10-90 (interval of 10) and store that
lliP
in array1

Perform the following tasks:

a. Extract the 1st row from the array


b. Extract the last element from the array
te
In

Contact us: [email protected] / © Copyright Intellipaat / All rights reserved

You might also like