Question: must use python to answer!!! 6.7 (Financial application: compute the future investment value) Write a function that computes a future investment value at a given

must use python to answer!!!
6.7 (Financial application: compute the future investment value) Write a function that computes a future investment value at a given interest rate for a specified number of years. The future investment is determined using the formula in Programming Exercise 2.190. Use the following function header: def futureInvestmentValue investment Amount, monthlyInterestRate, years): For example, futureInvestmentValue (10000, 0.05/12, 5) returns 12833.59. Write a test program that prompts the user to enter the investment amount and the annual interest rate in percent and prints a table that displays the future value for the years from 1 to 30. Sample Run for Exercise06_07.py Enter input data for the program (Sample data provided below. You may modify it.) 12319.82 9.5 Show the Sample Output Using the Preceeding Input Reset Execution Result: command>python Exercise06_07.py Enter investment amount, for example 100: 12319.82 Enter yearly interest rate, for example 5.25: 9.5 Years Future Value 13542.53 2 14886.60 3 16364.05 4 17988.15 19773.43 21735.89 23893.13 8 26264.46 Hint: The program has two functions: the main function and the futureInvestmentValue function. Step 1: Implement the futureInvestmentValue function to compute the futureInvestment value from investmentAmount, monthlyInterestRate and years using the formula from Exercise 2.19 in Chapter 2. This function return futureInvestmentValue. You already solved programing exercise 2.19 in the assignment 1. I listed the formula from programing exercise 2.19 below for your convenience. numberOfMonths future InvestmentValue = investment Amount X (1+ monthlyInterest Rate) Step 2: Implement the main function as follows: Step 2.1: Prompt the user to enter investmentAmount (float) and annualInterest Rate (float). Step 2.2: Write a for loop as follows: for each year from 1 to 30, display year and the result from invoking futureInvestmentValue(investmentAmount, annualInterest Rate / 1200, year). You need to use the format function to display formatted output. 6.7 (Financial application: compute the future investment value) Write a function that computes a future investment value at a given interest rate for a specified number of years. The future investment is determined using the formula in Programming Exercise 2.190. Use the following function header: def futureInvestmentValue investment Amount, monthlyInterestRate, years): For example, futureInvestmentValue (10000, 0.05/12, 5) returns 12833.59. Write a test program that prompts the user to enter the investment amount and the annual interest rate in percent and prints a table that displays the future value for the years from 1 to 30. Sample Run for Exercise06_07.py Enter input data for the program (Sample data provided below. You may modify it.) 12319.82 9.5 Show the Sample Output Using the Preceeding Input Reset Execution Result: command>python Exercise06_07.py Enter investment amount, for example 100: 12319.82 Enter yearly interest rate, for example 5.25: 9.5 Years Future Value 13542.53 2 14886.60 3 16364.05 4 17988.15 19773.43 21735.89 23893.13 8 26264.46 Hint: The program has two functions: the main function and the futureInvestmentValue function. Step 1: Implement the futureInvestmentValue function to compute the futureInvestment value from investmentAmount, monthlyInterestRate and years using the formula from Exercise 2.19 in Chapter 2. This function return futureInvestmentValue. You already solved programing exercise 2.19 in the assignment 1. I listed the formula from programing exercise 2.19 below for your convenience. numberOfMonths future InvestmentValue = investment Amount X (1+ monthlyInterest Rate) Step 2: Implement the main function as follows: Step 2.1: Prompt the user to enter investmentAmount (float) and annualInterest Rate (float). Step 2.2: Write a for loop as follows: for each year from 1 to 30, display year and the result from invoking futureInvestmentValue(investmentAmount, annualInterest Rate / 1200, year). You need to use the format function to display formatted output
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
