Question: x data = n p . array ( [ 1 , 4 , 9 , 1 6 , 2 5 , 3 6 ] )

x data =np.array([1,4,9,16,25,36])
and we will need to access an individual element of the array by using an index:
element=xdata [3]
print (element)
or maybe subsets of the array using slicing:
subset=xdata 2:-2
print (subset)
Do some researchfonline to understand how indices and slicing work with python lists to predict the
output of running the lines of code above.
25
[4916253614]
16
[916]
 x data =np.array([1,4,9,16,25,36]) and we will need to access an individual

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!