Question: Exercise 3 - 3 Enhance the Future Value program In this exercise, you ll enhance the Future Value program so the console display looks something
Exercise Enhance the Future Value program
In this exercise, youll enhance the Future Value program so the console display looks something like this:
Welcome to the Future Value Calculator
Enter monthly investment:
Entry must be greater than Please try again.
Enter monthly investment:
Enter yearly interest rate:
Entry must be greater than and less than or equal to
Please try again.
Enter yearly interest rate:
Enter number of years:
Entry must be greater than and less than or equal to
Please try again.
Enter number of years:
Year Future Value
Year Future Value
Year Future Value
Year Future Value
Year Future Value
Year Future Value
Year Future Value
Year Future Value
Year Future Value
Year Future Value
Continue yn n
In IDLE, open the futurevalue.py file thats in this folder: murachpythonexercisesch
Test the program but remember that it doesnt do any validation so enter valid numbers.
Add data validation for the monthly investment entry. Use a while loop to check the validity of the entry and keep looping until the entry is valid. To be valid, the investment amount must be greater than zero. If it isnt an error message like the first one shown above should be displayed.
Use the same technique to add data validation for the interest rate and years. The interest rate must be greater than zero and less than or equal to And the years must be greater than zero and less than or equal to For each invalid entry, display an appropriate error message. When youre finished, youll have three while loops and a for loop nested within an outer while loop.
Modify the statements in the for loop that calculates the future value so one line is displayed for each year that shows the year number and future value, as shown above. To do that, you need to work with the integer thats returned by the range function.
When you completed modifications shown above, then enhance your program so the console will look something like this:
Welcome to the Future Value Calculator
Enter monthly investment:
Entry must be greater than Please try again.
Enter monthly investment:
Enter yearly interest rate:
Entry must be greater than and less than or equal to
Please try again.
Enter yearly interest rate:
Enter number of years:
Entry must be greater than and less than or equal to
Please try again.
Enter number of years:
Year :
Future Value:
Total Contributions:
Total Interest Earned:
Year :
Future Value:
Total Contributions:
Total Interest Earned:
Year :
Future Value:
Total Contributions:
Total Interest Earned:
Year :
Future Value:
Total Contributions:
Total Interest Earned:
Year :
Future Value:
Total Contributions:
Total Interest Earned:
Year :
Future Value:
Total Contributions:
Total Interest Earned:
Year :
Future Value:
Total Contributions:
Total Interest Earned:
Year :
Future Value:
Total Contributions:
Total Interest Earned:
Year :
Future Value:
Total Contributions:
Total Interest Earned:
Year :
Future Value:
Total Contributions:
Total Interest Earned:
Would you like to calculate another future value yn n
Thank you for using the Future Value Calculator. Goodbye!
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
