{"id":947,"date":"2014-10-16T05:41:57","date_gmt":"2014-10-16T09:41:57","guid":{"rendered":"http:\/\/www.xavignu.com\/?p=947"},"modified":"2014-10-17T09:19:47","modified_gmt":"2014-10-17T13:19:47","slug":"small-script-to-calculate-an-annuity","status":"publish","type":"post","link":"https:\/\/www.xavignu.com\/?p=947","title":{"rendered":"Small script to calculate future value"},"content":{"rendered":"<p>Heres a small script I wrote to calculate the <a href=\"http:\/\/en.wikipedia.org\/wiki\/Future_value\" target=\"_blank\">future value<\/a>.<\/p>\n<p>[python]<br \/>\n#!\/usr\/bin\/env python<\/p>\n<p># This script calculate the future value<\/p>\n<p>iv = float(raw_input(&#8220;Enter initial value: &#8220;));<br \/>\nrate = float(raw_input(&#8220;Enter interest rate: &#8220;));<br \/>\ntimes = int(raw_input(&#8220;Enter the amount of years: &#8220;));<\/p>\n<p>fv = iv*((1 + (rate\/100))**times)<\/p>\n<p>print &#8220;Final amount is: %.2f.&#8221; %fv<br \/>\n[\/python]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Heres a small script I wrote to calculate the future value. [python] #!\/usr\/bin\/env python # This script calculate the future value iv = float(raw_input(&#8220;Enter initial value: &#8220;)); rate = float(raw_input(&#8220;Enter interest rate: &#8220;)); times = int(raw_input(&#8220;Enter the amount of years: &#8220;)); fv = iv*((1 + (rate\/100))**times) print &#8220;Final amount is: %.2f.&#8221; %fv [\/python]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[62,3],"tags":[22,6,67,70],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/pTQgt-fh","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.xavignu.com\/index.php?rest_route=\/wp\/v2\/posts\/947"}],"collection":[{"href":"https:\/\/www.xavignu.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xavignu.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xavignu.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xavignu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=947"}],"version-history":[{"count":5,"href":"https:\/\/www.xavignu.com\/index.php?rest_route=\/wp\/v2\/posts\/947\/revisions"}],"predecessor-version":[{"id":953,"href":"https:\/\/www.xavignu.com\/index.php?rest_route=\/wp\/v2\/posts\/947\/revisions\/953"}],"wp:attachment":[{"href":"https:\/\/www.xavignu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=947"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xavignu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=947"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xavignu.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=947"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}