Question: Python programming a) Create an array that starts in 33, ends in 5.55.5, and has 49 elements equally spaced. Assign the array to a variable

Python programming

a) Create an array that starts in 33, ends in 5.55.5, and has 49 elements equally spaced. Assign the array to a variable named first_array.

b) Create an array that starts with the element 2323, ends in 992992 (including it), and steps by 1717 (i.e., 23,40,...,975,99223,40,...,975,992 ). Assign the array to a variable named second_array.

c) Given two arrays, array_one and array_two, use slicing to multiply element-wise the 21st to 35th elements of array_one with the 22nd to 36th elements of array_two, assign the resulting array to a variable named slice_prod.

Hint: the index of the 1st element in an array is 00 in Python.

# DO NOT MODIFY THIS CELL

numpy.random.seed(108)
array_one = numpy.random.rand(100)
array_two = numpy.random.rand(100)

Python programming a) Create an array that starts in 33, ends in

Exercise 2 a) Create an array that starts in -3, ends in 5.5, and has 49 elements equally spaced. Assign the array to a variable named first_array. In [ ]: YOUR CODE HERE raise NotImplementedError() In (): b) Create an array that starts with the element 23, ends in 992 (including it), and steps by 17 (i.e., 23,40,...,975,992). Assign the array to a variable named second_array In (): YOUR CODE HERE raise NotImplementedError() In [ ]: c) Given two arrays, array_one and array_two, use slicing to multiply element-wise the 21st to 35th elements of array_one with the 22nd to 36th elements of array_two, assign the resulting array to a variable named slice_prod. Hint: the index of the 1st element in an array is 0 in Python. In [ ]: # DO NOT MODIFY THIS CELL numpy.random. seed(108) array_one - numpy.random.rand(100) array two - numpy.random.rand (100)

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!