-
Notifications
You must be signed in to change notification settings - Fork 1
/
compound2.html
223 lines (214 loc) · 14.8 KB
/
compound2.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
<!DOCTYPE html>
<html lang="vi">
<head>
<title>Tin tức Python PyMI.vn</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta charset="utf-8" />
<link href="https://n.pymi.vn/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Tin tức Python PyMI.vn Full Atom Feed" />
<!-- twitter card metadata -->
<meta name="twitter:site" content="">
<meta name="twitter:title" content="Gửi 100 triệu vào ngân hàng hôm nay, bao giờ có 1 tỷ?">
<meta name="twitter:description" content="Lãi suất Vietcombank 31/10/2021 là 5.5%/năm">
<!-- OG Tags -->
<meta property="og:url" content="./compound2.html"/>
<meta property="og:title" content="Gửi 100 triệu vào ngân hàng hôm nay, bao giờ có 1 tỷ? | Tin tức Python PyMI.vn" />
<meta property="og:description" content="Lãi suất Vietcombank 31/10/2021 là 5.5%/năm" />
<!-- favicon -->
<!-- moment.js for date formatting -->
<script src="./theme/js/moment.js"></script>
<!-- css -->
<link rel="stylesheet" type="text/css" href="./theme/css/main.css" />
<script>
/*! grunt-grunticon Stylesheet Loader - v2.1.2 | https://github.com/filamentgroup/grunticon | (c) 2015 Scott Jehl, Filament Group, Inc. | MIT license. */
(function(e){function t(t,n,r,o){"use strict";function a(){for(var e,n=0;u.length>n;n++)u[n].href&&u[n].href.indexOf(t)>-1&&(e=!0);e?i.media=r||"all":setTimeout(a)}var i=e.document.createElement("link"),l=n||e.document.getElementsByTagName("script")[0],u=e.document.styleSheets;return i.rel="stylesheet",i.href=t,i.media="only x",i.onload=o||null,l.parentNode.insertBefore(i,l),a(),i}var n=function(r,o){"use strict";if(r&&3===r.length){var a=e.navigator,i=e.Image,l=!(!document.createElementNS||!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect||!document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1")||e.opera&&-1===a.userAgent.indexOf("Chrome")||-1!==a.userAgent.indexOf("Series40")),u=new i;u.onerror=function(){n.method="png",n.href=r[2],t(r[2])},u.onload=function(){var e=1===u.width&&1===u.height,a=r[e&&l?0:e?1:2];n.method=e&&l?"svg":e?"datapng":"png",n.href=a,t(a,null,null,o)},u.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==",document.documentElement.className+=" grunticon"}};n.loadCSS=t,e.grunticon=n})(this);(function(e,t){"use strict";var n=t.document,r="grunticon:",o=function(e){if(n.attachEvent?"complete"===n.readyState:"loading"!==n.readyState)e();else{var t=!1;n.addEventListener("readystatechange",function(){t||(t=!0,e())},!1)}},a=function(e){return t.document.querySelector('link[href$="'+e+'"]')},c=function(e){var t,n,o,a,c,i,u={};if(t=e.sheet,!t)return u;n=t.cssRules?t.cssRules:t.rules;for(var l=0;n.length>l;l++)o=n[l].cssText,a=r+n[l].selectorText,c=o.split(");")[0].match(/US\-ASCII\,([^"']+)/),c&&c[1]&&(i=decodeURIComponent(c[1]),u[a]=i);return u},i=function(e){var t,o,a;o="data-grunticon-embed";for(var c in e)if(a=c.slice(r.length),t=n.querySelectorAll(a+"["+o+"]"),t.length)for(var i=0;t.length>i;i++)t[i].innerHTML=e[c],t[i].style.backgroundImage="none",t[i].removeAttribute(o);return t},u=function(t){"svg"===e.method&&o(function(){i(c(a(e.href))),"function"==typeof t&&t()})};e.embedIcons=i,e.getCSS=a,e.getIcons=c,e.ready=o,e.svgLoadedCallback=u,e.embedSVG=u})(grunticon,this);
grunticon(["./theme/css/icons.data.svg.css", "./theme/css/icons.data.png.css", "./theme/css/icons.fallback.css"]);
</script>
<noscript><link href="./theme/css/icons.fallback.css" rel="stylesheet"></noscript>
<!-- menu toggle javascript -->
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", initMenu);
function initMenu(){
var menu = document.getElementById("menu");
var menulink = document.getElementById("menu-link");
menulink.addEventListener("click", function toggleMenu(){
window.event.preventDefault();
menulink.classList.toggle('active');
menu.classList.toggle('active');
});
};
</script>
<meta name="description" content="Lãi suất Vietcombank 31/10/2021 là 5.5%/năm" />
<meta name="tags" content="calculus" />
<meta name="tags" content="finance" />
<meta name="tags" content="math" />
</head>
<body>
<div role="banner" id="masthead">
<header>
<h1><a href="/">Pymiers's Blog</a></h1>
<a href="#menu" id="menu-link">more stuff</a>
<nav id="menu">
<ul>
<li><a href="./category/features.html">features</a></li>
<li class="active"><a href="./category/news.html">news</a></li>
<li><a href="./category/pymivn.html">pymi.vn</a></li>
</ul>
</nav>
</header>
</div>
<div class="page" role="main">
<div class="article" role="article">
<article>
<footer>
<a name="top"></a>
<p>
<time datetime=" 2021-10-31 00:00:00+07:00">
<script>document.write(moment('2021-10-31 00:00:00+07:00').format('LL'));</script>
</time>
</p>
</footer>
<header>
<h2>
Gửi 100 triệu vào ngân hàng hôm nay, bao giờ có 1 tỷ?
</h2>
<center>
<h4>
by Pymier0
</h4>
</center>
</header>
<div class="content">
<p><img alt="img" src="https://images.unsplash.com/photo-1459257831348-f0cdd359235f?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=600&q=80"></p>
<p>Bài <a href="./compound.html">trước</a> đã giới thiệu khái niệm lãi gộp (compound interest)
với lãi suất 1%.
Lãi suất ngân hàng Vietcombank tại thời điểm viết bài là 5.5%/năm, sau 13 năm
sẽ gấp đôi, sau 44 năm
ta sẽ có 1 tỷ (gấp 10), sau 100 năm sẽ có 21 tỷ.</p>
<p><img alt="img" src="./images/compound2.png"></p>
<div class="highlight"><pre><span></span><code><span class="n">rate</span> <span class="o">=</span> <span class="mf">5.5</span><span class="o">/</span><span class="mi">100</span>
<span class="n">m</span> <span class="o">=</span> <span class="mi">100</span>
<span class="n">acc</span> <span class="o">=</span> <span class="p">[]</span>
<span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">101</span><span class="p">):</span>
<span class="n">m</span> <span class="o">=</span> <span class="n">m</span> <span class="o">+</span> <span class="n">m</span> <span class="o">*</span> <span class="n">rate</span>
<span class="nb">print</span><span class="p">(</span><span class="n">i</span><span class="p">,</span> <span class="n">m</span><span class="p">)</span>
<span class="n">acc</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">m</span><span class="p">)</span>
<span class="mi">1</span> <span class="mf">105.5</span>
<span class="mi">2</span> <span class="mf">111.3025</span>
<span class="mi">3</span> <span class="mf">117.4241375</span>
<span class="mi">4</span> <span class="mf">123.8824650625</span>
<span class="mi">5</span> <span class="mf">130.6960006409375</span>
<span class="mi">6</span> <span class="mf">137.88428067618906</span>
<span class="mi">7</span> <span class="mf">145.46791611337946</span>
<span class="mi">8</span> <span class="mf">153.46865149961533</span>
<span class="mi">9</span> <span class="mf">161.90942733209417</span>
<span class="mi">10</span> <span class="mf">170.81444583535935</span>
<span class="mi">11</span> <span class="mf">180.20924035630412</span>
<span class="mi">12</span> <span class="mf">190.12074857590085</span>
<span class="mi">13</span> <span class="mf">200.57738974757538</span>
<span class="mi">14</span> <span class="mf">211.60914618369202</span>
<span class="mi">15</span> <span class="mf">223.24764922379507</span>
<span class="mi">16</span> <span class="mf">235.5262699311038</span>
<span class="mi">17</span> <span class="mf">248.4802147773145</span>
<span class="mi">18</span> <span class="mf">262.1466265900668</span>
<span class="mi">19</span> <span class="mf">276.56469105252046</span>
<span class="mi">20</span> <span class="mf">291.7757490604091</span>
<span class="mi">21</span> <span class="mf">307.82341525873164</span>
<span class="mi">22</span> <span class="mf">324.7537030979619</span>
<span class="mi">23</span> <span class="mf">342.6151567683498</span>
<span class="mi">24</span> <span class="mf">361.458990390609</span>
<span class="mi">25</span> <span class="mf">381.3392348620925</span>
<span class="mi">26</span> <span class="mf">402.3128927795076</span>
<span class="mi">27</span> <span class="mf">424.44010188238053</span>
<span class="mi">28</span> <span class="mf">447.7843074859115</span>
<span class="mi">29</span> <span class="mf">472.4124443976366</span>
<span class="mi">30</span> <span class="mf">498.3951288395066</span>
<span class="mi">31</span> <span class="mf">525.8068609256794</span>
<span class="mi">32</span> <span class="mf">554.7262382765917</span>
<span class="mi">33</span> <span class="mf">585.2361813818043</span>
<span class="mi">34</span> <span class="mf">617.4241713578035</span>
<span class="mi">35</span> <span class="mf">651.3825007824827</span>
<span class="mi">36</span> <span class="mf">687.2085383255193</span>
<span class="mi">37</span> <span class="mf">725.0050079334228</span>
<span class="mi">38</span> <span class="mf">764.8802833697611</span>
<span class="mi">39</span> <span class="mf">806.9486989550979</span>
<span class="mi">40</span> <span class="mf">851.3308773976283</span>
<span class="mi">41</span> <span class="mf">898.1540756544979</span>
<span class="mi">42</span> <span class="mf">947.5525498154952</span>
<span class="mi">43</span> <span class="mf">999.6679400553475</span>
<span class="mi">44</span> <span class="mf">1054.6496767583915</span>
<span class="mi">45</span> <span class="mf">1112.655408980103</span>
<span class="mi">46</span> <span class="mf">1173.8514564740085</span>
<span class="mi">47</span> <span class="mf">1238.4132865800789</span>
<span class="mi">48</span> <span class="mf">1306.5260173419833</span>
<span class="mi">49</span> <span class="mf">1378.3849482957924</span>
<span class="mi">50</span> <span class="mf">1454.196120452061</span>
<span class="mi">51</span> <span class="mf">1534.1769070769244</span>
<span class="mi">52</span> <span class="mf">1618.5566369661553</span>
<span class="mi">53</span> <span class="mf">1707.5772519992938</span>
<span class="mi">54</span> <span class="mf">1801.494000859255</span>
<span class="mi">55</span> <span class="mf">1900.576170906514</span>
<span class="mi">56</span> <span class="mf">2005.1078603063725</span>
<span class="mi">57</span> <span class="mf">2115.388792623223</span>
<span class="mi">58</span> <span class="mf">2231.7351762175</span>
<span class="mi">59</span> <span class="mf">2354.4806109094625</span>
<span class="mi">60</span> <span class="mf">2483.9770445094828</span>
<span class="mi">61</span> <span class="mf">2620.595781957504</span>
<span class="mi">62</span> <span class="mf">2764.728549965167</span>
<span class="mi">63</span> <span class="mf">2916.7886202132513</span>
<span class="mi">64</span> <span class="mf">3077.21199432498</span>
<span class="mi">65</span> <span class="mf">3246.458654012854</span>
<span class="mi">66</span> <span class="mf">3425.013879983561</span>
<span class="mi">67</span> <span class="mf">3613.3896433826567</span>
<span class="mi">68</span> <span class="mf">3812.126073768703</span>
<span class="mi">69</span> <span class="mf">4021.7930078259815</span>
<span class="mi">70</span> <span class="mf">4242.99162325641</span>
<span class="mi">71</span> <span class="mf">4476.356162535512</span>
<span class="mi">72</span> <span class="mf">4722.555751474965</span>
<span class="mi">73</span> <span class="mf">4982.296317806088</span>
<span class="mi">74</span> <span class="mf">5256.322615285423</span>
<span class="mi">75</span> <span class="mf">5545.420359126121</span>
<span class="mi">76</span> <span class="mf">5850.418478878058</span>
<span class="mi">77</span> <span class="mf">6172.191495216351</span>
<span class="mi">78</span> <span class="mf">6511.66202745325</span>
<span class="mi">79</span> <span class="mf">6869.803438963178</span>
<span class="mi">80</span> <span class="mf">7247.642628106153</span>
<span class="mi">81</span> <span class="mf">7646.262972651992</span>
<span class="mi">82</span> <span class="mf">8066.807436147851</span>
<span class="mi">83</span> <span class="mf">8510.481845135982</span>
<span class="mi">84</span> <span class="mf">8978.558346618462</span>
<span class="mi">85</span> <span class="mf">9472.379055682477</span>
<span class="mi">86</span> <span class="mf">9993.359903745013</span>
<span class="mi">87</span> <span class="mf">10542.994698450988</span>
<span class="mi">88</span> <span class="mf">11122.859406865793</span>
<span class="mi">89</span> <span class="mf">11734.616674243412</span>
<span class="mi">90</span> <span class="mf">12380.0205913268</span>
<span class="mi">91</span> <span class="mf">13060.921723849773</span>
<span class="mi">92</span> <span class="mf">13779.27241866151</span>
<span class="mi">93</span> <span class="mf">14537.132401687893</span>
<span class="mi">94</span> <span class="mf">15336.674683780728</span>
<span class="mi">95</span> <span class="mf">16180.191791388668</span>
<span class="mi">96</span> <span class="mf">17070.102339915044</span>
<span class="mi">97</span> <span class="mf">18008.95796861037</span>
<span class="mi">98</span> <span class="mf">18999.450656883942</span>
<span class="mi">99</span> <span class="mf">20044.42044301256</span>
<span class="mi">100</span> <span class="mf">21146.863567378252</span>
</code></pre></div>
<p>Hết.</p>
<p>Đăng ký ngay tại <a href="https://pymi.vn">PyMI.vn</a> để học Python tại Hà Nội <span class="caps">TP</span> <span class="caps">HCM</span> (Sài Gòn),
trở thành lập trình viên #python chuyên nghiệp ngay sau khóa học.</p>
</div>
<div class="back-to-top">
<a href="#top">back to top</a>
</div>
</article>
</div>
<!-- end article -->
<footer>
<div class="icons">
<a href="https://github.com/pymivn" target="_blank"><div class="icon-github icon"></div></a>
</div>
<p>© <script>document.write(moment().format('YYYY'));</script> Pymiers</p>
</footer>
</div>
</body>
</html>