Question: PLEASE PROVIDE ANSWERS BASED ON PYTHON CODE, USE NUMPY LIBRARY Answer all the following questions. Mark question numbers as comments in code cells. ( 1

PLEASE PROVIDE ANSWERS BASED ON PYTHON CODE, USE NUMPY LIBRARY
Answer all the following questions. Mark question numbers as comments in code cells.
(15 points) In five cells create five lists respectively, each satisfying one of the
following requirements. Each list should be assigned to a parameter and its value
should be displayed under the cell:
a.(3 points) Create a list of 15 integers of your choice, with some repeated
elements; the list object is denoted by list a. Output list a.
b.(3 points) Create a list of 20 float numbers of your choice, with some
repeated elements; the list object is denoted by list b. Output list b.
c.(3 points) Use list a and list b to create a list denoted by list c that includes
all elements of both list a and list b. Output list c.
d.(3 points) Use list a and list b to create a list denoted by list d that includes
unique elements of both list a and list b. Output list d.
e.(3 points) First create a string of a complete sentence with punctuation(s).
Then create a list of words comprising the sentence from the string. Remove
any punctuation. Denote the list by list e and output it.
(15 points) In five cells create five arrays respectively, each satisfying one of the
following requirements. Each array should be assigned to a parameter and its value
should be displayed under the cell:
a.(3 points) Create a 1-dimensional array of zeros with the array length equal
to your height (in cm). Denote the array by array a and output it.
b.(3 points) Set all elements in array a to 2023 and denote the new array by
array b. Output array b.
c.(3 points) Make a 50 by 50 identity matrix as an array. Denote the array by
array ?cat and output it.
d.(3 points) First make two arrays: a 10 by 10 matrix of positive float numbers
(denoted by A) and a 10 by 2 matrix of float numbers (denoted by B).
Generate a new array denoted by array d, i.e.arraydd=A2B. Output array d.
e.(3 points) First generate a matrix C,C=BTA. Then generate a matrix arrayc2e,
with each of its element being the square root of the element of matrix C in
the same position. Output array e.
 PLEASE PROVIDE ANSWERS BASED ON PYTHON CODE, USE NUMPY LIBRARY Answer

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