Question: Using Loops (FOR loop or WHILE loop), to slice arrays. first create a 20x20 array. This part is easy using the np.arange(400).reshape(20,20). Then write a
UBE WILL UP U consecutive integers starting at 1 i.e. 1+2+3+...) and stops before the sum gets to 1000. Have the code print the value of this sum to the command line. 4. Using Loops (20 points) In this problem we will be using loops to slice arrays. First, create a 20x20 array of any values you would like. Write a program that ask the user to input numbers that will tell your program how they want to slice up the array. For example the user could input numbers to take that array and slice out only the first row, or a 2D section from the middle. I will leave it up to you how to accomplish this but you are not allow to use the slicing method in problem 1, you must accomplish this using loops
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
