Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

copy to code please python The assignment is to create a program to predict the amount of money you will have in your IRA when

image text in transcribed

copy to code please

python

The assignment is to create a program to predict the amount of money you will have in your IRA when you retire. Inputs are: 1. Number of years until you retire, it must be a whole number (integer) in the range 1 to 70. Any number outside of this range is to be rejected and the user will be required to enter the value again, this repeat must be done until a valid number is input. Expected interest rate as a percent (this is the average expected earnings per year until retirement is reached). The number must be 0 or greater, any other value will be rejected and as above, the user must be polled until a valid number is input. If the number is greater than 10%, the user must be asked if he/she really expects to earn this much, if the user replies in the affirmative, the number is to be used, otherwise the user will be asked to input the value again and the above checks will be made. The initial amount in the IRA. This is a decimal number and may be any non-negative number. If a negative number is entered, the value is to be rejected and the user will be required to enter an acceptable value. Again, loop until a valid value is input. The amount expected to be added to the IRA each year. This is a decimal number in the range of O to $2,500. The program must loop asking for this value until a valid value is entered. After the data is input and validated, the program is to loop printing out the value of the IRA every 5 years (hint use modulus to check for every 5th year) and the value at the end of the time entered as input #1. The value is to be computed in a loop where the value each year is determined by: value = value + (value)*rate + yearlyinput Remember the rate in the above equation is the rate entered in #2 above divided by 100, the decimal equivalent of the percentage. This problem is Feb 19, 2020. Make certain to test your program before you have me check it. You can count on me entering bad values to be certain they are rejected. Also make sure that the amounts that your program compute are valid! You can do some testing by having an interest rate of 0% to verify the yearly addition is handled correctly. You can use an interest rate of 10% to validate one year's interest rate. You can print out the value every year while debugging and then put in the 5 year print later. A while loop while probably be handy for you input validation. Make sure that your name, assignment #3, and a brief description of the program are at the top of the code as comments. You must use proper blocking in the code, good variable names, and have meaningful comments in the code as well having a program the works properly to receive full credit

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Administrator Limited Edition

Authors: Martif Way

1st Edition

B0CGG89N8Z

More Books

Students also viewed these Databases questions

Question

do you answer assignment questions?

Answered: 1 week ago

Question

Design a health and safety policy.

Answered: 1 week ago