Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

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.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Healthcare Finance

Authors: Paula H. Song, Kristin L. Reiter

4th Edition

1640553223, 978-1640553224

More Books

Students explore these related Finance questions