subject

Question 1a 1. Create a (3,3) array where row 0 is [0, 0, 0], row 1 is [2, 2, 2], row 2 is [-2, -2, -2]. Print the array.
2. Change element [0,0] to 10 and element [2,2] to -10. Print the array.
3. Subtract 2 from every element. Print the array.
4. Print all of the elements of the revised array that are positive.
In [ ]: # Your codes for 1.
In [ ]: # Your codes for 2.
In [ ]: # Your codes for 3.
In [ ]: # Your codes for 4.
Question 1b
You are provided with two lists of numbers.
• List 'x' denotes all 8 possible dollar investment outcomes of a risky project;
• List 'p' denotes their corresponding outcome probabilities.
• For instance, there is a 5% chance of $10000.
In this question, let's first convert the two lists into two separate arrays. Can you use np. dot to calculate the expected value of this risky project? That is, 10000X0.05+1000X0.05+100X0.2 ... Calculation without using np. dot() will be considered no points.
Finally, print the following sentence using print+format: The expected value of this risky project is $XXX. X.
Hint: the portfolio mean return example at the end of 2.3
In [ ]: x = (10000, 1000, 100, 10, 1, 0, -10, -100]
p = [0.05, 0.05, 0.20, 0.20, 0.1, 0.1, 0.1, 0.2]
In [ ]: # Your code here

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 04:30
Ryan is working on the layout of her web page. she needs to figure out where her header, navigation bar, text, and images should go. what technique can her?
Answers: 1
question
Computers and Technology, 22.06.2019 22:00
What is a distinguishing feature of today’s graphic application software?) graphic applications are used today on a variety of devices, including touch-screen kiosks and mobile phones.
Answers: 3
question
Computers and Technology, 22.06.2019 23:30
Jaina and tomas are being considered as new tenants in an apartment. the landlord looks at their creditworthiness because he wants to be sure his new tenant pays the rent on time and in full. the table below summarizes the information that was on their applications. application information questions jaina tomas how many years have you had your job? 5 2 what is your monthly salary? $1,850 $2,500 how many credit cards do you have? 4 1 how much debt do you have? $13,000 $7,000 how many times were you late with payments on credit cards in the past year? 5 1 who will the landlord decide to be more creditworthy and why? tomas because the ratio of his debt to income is less. jaina because she has had her job longer, which makes her look more stable. jaina because she has more credit cards available to her. tomas because he makes more money per month.
Answers: 2
question
Computers and Technology, 23.06.2019 01:00
Write the command that can be used to answer the following questions. (hint: try each out on the system to check your results.) a. find all files on the system that have the word test" as part of their filename. b. search the path variable for the pathname to the awk command. c. find all files in the /usr directory and subdirectories that are larger than 50 kilobytes in size. d. find all files in the /usr directory and subdirectories that are less than 70 kilobytes in size. e. find all files in the / directory and subdirectories that are symbolic links. f. find all files in the /var directory and subdirectories that were accessed less than 60 minutes ago. g. find all files in the /var directory and subdirectories that were accessed less than six days ago. h. find all files in the /home directory and subdirectories that are empty. i. find all files in the /etc directory and subdirectories that are owned by the group bin."
Answers: 1
You know the right answer?
Question 1a 1. Create a (3,3) array where row 0 is [0, 0, 0], row 1 is [2, 2, 2], row 2 is [-2, -2...
Questions
question
Business, 25.11.2021 06:20
question
Geography, 25.11.2021 06:20
question
Mathematics, 25.11.2021 06:20
question
Mathematics, 25.11.2021 06:20
Questions on the website: 13722367