Question: Using Python: The Rule of 72 is a financial investment guideline that claims you can determine the number of years it will take an investment
Using Python: The Rule of 72 is a financial investment guideline that claims you can determine the number of years it will take an investment to double in value by dividing the interest rate into 72. For example, with a 10% rate of return, it would take 7.2 years (ie:72/10) for an investment to double in value. The actual future value of an investment can be calculated with the formula:
FV=PV*(1+r)^n Where PV is the investment amount, r is the interest rate and n is the number of years Write a function named q5() that determines the accuracy of the Rule of 72 by prompting the user for an investment amount and an interest rate, then after formatting and displaying the input values, calculates and displaying the following results:
-The Rule of 72 estimate for doubling the investment (to 2 decimal place)
-Actual calculated value after the years estimated using Rule of 72 (to 2 decimal places) -The accuracy of Rule of 72 estimate (to 3 decimal places)
Output should read exactly as below:

This program checks the accuracy of the Rule of 72' investment guidelines Enter the investment amount: $5321.27 Enter the interest rate: 0.095 Based on the 'Rule of 72' it should take 7.6 years at 9.50% to double your investment to $10642.54. The actual calculated value for your investment after 7.58 years is $10,586.02 The 'Rule of 72, is accurate to: 0.534%
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
