Question: This is my assignment in Python, all 3 exercises are under the same problem so this meets Chegg's Guidelines so I appreciate if all parts



This is my assignment in Python, all 3 exercises are under the same problem so this meets Chegg's Guidelines so I appreciate if all parts were correctly coded, please and thank you.
Exercise 1 Using and its functions: a) Create an array of 100 elements all equal to 1 , assign the array to a variable named and print it. n[]:#YOURCODEHEREraiseNotImplementedError() b) Create an array of 50 elements all equal to 0 , assign the array to a variable named zero_array, and print it. c) Create an array that starts with the element 3 , ends in 99 , and steps by 2 (i.e., 357 ...99). Assign the array to a variable named first_array , and print it. n [ ] : \# YOUR CODE HERE raise NotimplementedError() n [ ] : d) Create an array that starts in 4, ends in 4 , and has 41 elements. Assign the array to a variable named second_array , and print it. n [ ] : \# YOUR CODE HERE raise NotimplementedError() [ ] : c) Create an array named that is the result of the operation below, and print it. 2x2+(3y)2 \# YOUR CODE HERE raise NotImplementedError() Given the following array: In [ ]: arr = numpy array([22,13,54,35,76,17,68,49,19]) a) Using [ ] , access the first, fifth and last elements, add them, assign the result to a varaible named and print it. In [ ] : \# YOUR CODE HERE raise NotimplementedError() In [ ] : b) Using slicing, grab a slice that goes from the first to the third element (included), asign it to a variable named slice_1, and print it. In [ ] : \# YOUR CODE HERE raise NotimplementedError() In [ ] : c) Using slicing, grab the slice that contains the three elements in the middle of arr, assign the resulting array to a variable named slice mid . Then, subtract 17 from all the elements in slice_mid (do not use for statements), assign the result to a variable named slice_mid_17, and print both slice_mid and slice_mid_17. In [ ] : \# YOUR CODE HERE raise NotimplementedError() In [ ] : d) Using slicing, create an array that is the result of adding the first three elements with the last three elements, assign it to a variable named slice_sum , and print it. In [ ] : \# YOUR CODE HERE raise NotimplementedError() In [ ]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
