Question: 2 . 7 . 5 : Numpy Write code under the corresponding comment in the code box below to perform all of the following tasks:

2.7.5: Numpy
Write code under the corresponding comment in the code box below to perform all of the following tasks:
Create and print a random integer array named x of size 6 by 8 where the integer ranges from 20 to 100(100 inclusive). Set the
seed of the random generator to be 42.
Using array x, print all rows with even indices and columns 3,6, and 1 in this given order.
Print the second row of x in the reverse order.
Use masking to print all elements of x greater than or equal to 60.
Multiply each element of columns 2,5, and 7 of x by 2 and print the resulting array.
Split the array x into three nd-arrays of size (28),(18), and (38) and print the arrays.
2 . 7 . 5 : Numpy Write code under the

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 Programming Questions!