0

Python for Finance Code Repo 11.2

Could someone please comment the answer for this question please? There’s a character limit for this post so I’ll use the comment section for space please check :) Let's continue with our Bitcoin calculations. You decide to invest $1000 in Bitcoin in 2018, at the price in the declared array: $3869.47. 1. Calculate how much your investment is worth at the end of each year using the prices denoted in the code. 2. Draw a chart to showcase how much your $1000 investment changes in value each year.

7th Jul 2022, 3:06 AM
--
6 Answers
+ 1
-- If you have mentioned Code Repo 11.2 then no need to post full description people can go and see. Have you tried to solve if yes then show us.
7th Jul 2022, 3:42 AM
A͢J
A͢J - avatar
0
First, calculate how many Bitcoins you will have at the start by dividing your investment by the cost of Bitcoin in the first year (the first element of the given array). Then multiply the entire array of the prices by that number to get the value for each year. Use np.multiply(array, number) to multiply an array with a number.
7th Jul 2022, 3:06 AM
--
0
Don't forget to import the matplotlib.pyplot package under the name "plt" to draw the chart using plt.plot() function. Add the plt.savefig() function (using the name of the chart as an argument) at the end of the code to draw the chart in the CodePlayground.
7th Jul 2022, 3:07 AM
--
0
I posted a discussion without the description before but someone asked to post it. I’ved tried to solve it but it’s basically nothing :( have no clue
7th Jul 2022, 3:45 AM
--
0
There’s a code someone posted on the ‘Code’ section but it doesn’t work. Below is the code that someone posted. https://code.sololearn.com/cv335YU63k18/?ref=app
7th Jul 2022, 3:57 AM
--
0
I think this one is correct. https://code.sololearn.com/cv335YU63k18/?ref=app but on the line 13, it should be np.multiply not np.mulitply
5th Aug 2022, 4:56 AM
Devi Levina