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

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 program that asks the user to input numbers that will tell your program how they want to slice up the array. For example, the usee could slice out the first row, or a 2D section from the middle. We cannot use the typical slicing for arrays.
Using Loops (FOR loop or WHILE loop), to slice arrays. first create

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

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!