PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import numpy as np
import numpy_financial as npf
import matplotlib.pyplot as plt
#price for 2018-2021
bitcoin = [3869.47, 7188.46, 22203.31, 29391.78]
an_array = np.array(bitcoin)
multiplied_array = an_array * 10
print(multiplied_array)
mining_array = [-50000, 38694.7, 71884.6, 222033.1, 293917.8]
npf.irr(mining_array)
bitcoin_owned = 1000/bitcoin[0]
bitcoin_newValue = np.mulitply(bitcoin, bitcoin_owned)
year = ['2018','2019','2020','2021']
plt.plot(year, bitcoin_newValue)
plt.savefig('Expected chart')
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run