{ "metadata": { "name": "EE-3" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": "Interest Formulas and their Application" }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": "Example 3.1 Page 29" }, { "cell_type": "code", "collapsed": false, "input": "#initialisation of variable\nP=20000.0;#in rupees\nn=10.0;#in years\ni=18.0;#% per annum\n\n#calculation\nF=P*(1+i/100)**n;\n\n#result\nprint \"Maturity value after 18 years is \", round(F,3),\" Rupees.\";\nprint \" Ans in the book is not correct\"", "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": "Maturity value after 18 years is : 104676.711 Rupees.\n Ans in the book is not correct\n" } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": "Example 3.2 Page 30" }, { "cell_type": "code", "collapsed": false, "input": "#initialisation of variable\nF=100000.0;#in rupees\nn=10.0;#in years\ni=15.0;#% per annum\n\n#calculation\nP=F/((1.0+i/100.0)**n);\n\n#result\nprint \"The person has to invest \", round(P,3),\" Rupees.\";\nprint \" Ans in the book is not correct\"", "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": "The person has to invest 24718.471 Rupees.\n Ans in the book is not correct\n" } ], "prompt_number": 5 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": "Example 3.3 Page 31" }, { "cell_type": "code", "collapsed": false, "input": "#initialisation of variable\nA=10000.0;#in rupees\nn=25.0;#in years\ni=20.0;#% per annum\n\n#calculation\nF=A*(((1+i/100)**n-1)/(i/100));\n\n#result\nprint \"The future sum of the annual equal payment after 25 years is \",round(F,3),\" Rupees.\";", "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": "The future sum of the annual equal payment after 25 years is 4719810.832 Rupees.\n" } ], "prompt_number": 8 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": "Example 3.4 Page 32" }, { "cell_type": "code", "collapsed": false, "input": "#initialisation of variable\nF=500000.0;#in rupees\nn=15.0;#in years\ni=18.0;#% per annum\n\n#calculation\nA=F*((i/100)/((1+i/100)**n-1));\n\n#result\nprint \"The annual equal ammount which must be deposited for 15 years is \",round(A,3),\" Rupees.\";", "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": "The annual equal ammount which must be deposited for 15 years is 8201.391 Rupees.\n" } ], "prompt_number": 12 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": "Example 3.5 Page 33" }, { "cell_type": "code", "collapsed": false, "input": "#initiasation of variable\nA=1000000.0;#in rupees\nn=20.0;#in years\ni=15.0;#% per annum\n\n#calculation\nP=A*(((1+i/100)**n-1)/((i/100)*(1+i/100)**n));\n\n#result\nprint \"The amount of reserve which must be setup now is : \",round(P,3),\" Rupees\";\nprint \" Ans in the book is not correct\"", "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": "The amount of reserve which must be setup now is : 6259331.474 Rupees\n Ans in the book is not correct\n" } ], "prompt_number": 13 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": "Example 3.6 Page 34" }, { "cell_type": "code", "collapsed": false, "input": "#initialisation of variable\nP=1000000.0;#in rupees\nn=15.0;#in years\ni=18.0;#% per annum\n\n#calculation\nA=P*(((i/100)*(1+i/100)**n)/((1+i/100)**n-1));\n\n#result\nprint \"The annual equivalent installment to be paid by the company to the bank is \",round(A),\" Rupees.\";", "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": "The annual equivalent installment to be paid by the company to the bank is : 196403.0 Rupees.\n" } ], "prompt_number": 14 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": "Example 3.7 Page 35" }, { "cell_type": "code", "collapsed": false, "input": "#initiation of variable\nA1=4000.0;#in rupees\nG=500.0;#in rupees\nn=10.0;#in years\ni=15.0;#% per annum\n\n#calculation\nA=A1+G*(((1+i/100)**n-(i/100)*n-1)/((i/100)*(1+i/100)**n-(i/100)));\nF=A*(((1+i/100)**n-1)/(i/100));\n\n#result\nprint \"At the end of 10th year, the compound amountr of all his payments will be : \",round(F,3),\" Rupees.\";", "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": "At the end of 10th year, the compound amountr of all his payments will be : 115560.6 Rupees.\n" } ], "prompt_number": 15 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": "Example 3.8 Page 36" }, { "cell_type": "code", "collapsed": false, "input": "#initiation of variable\nA1=8500.0;#in rupees\nG=-500.0;#in rupees\nn=10.0;#in years\ni=15.0;#% per annum\n\n#calculation\nA=A1+G*(((1+i/100)**n-(i/100)*n-1)/((i/100)*(1+i/100)**n-(i/100)));\nF=A*(((1+i/100)**n-1)/(i/100));\n\n#result\nprint \"At the end of 10th year, the compound amountr of all his payments will be : \",round(F,3),\" Rupees.\";", "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": "At the end of 10th year, the compound amountr of all his payments will be : 138235.878 Rupees.\n" } ], "prompt_number": 17 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": "Example 3.9 Page 38" }, { "cell_type": "code", "collapsed": false, "input": "#initiation of variable\nP=5000.0;#in rupees\nn=10.0;#in years\ni=12.0;#% per annum\nm=4.0;#no. of interest periods per year for quarterly\n\n#calculation\nN=n*m;\nr=i/m;\nF=P*(1+r/100)**N;\n\n#result\nprint\"Maturity value after 10 years is \",round(F,3),\" Rupees.\";", "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": "Maturity value after 10 years is : 16310.189 Rupees.\n" } ], "prompt_number": 18 } ], "metadata": {} } ] }