Question: Write a program named coast to retirement.py that allows the user to enter the following inputs. Assume the user always enters correct data types, but
Write a program named coast to retirement.py that allows the user to enter the following inputs. Assume the user always enters correct data types, but include validation loops on all inputs to guarantee that they follow these guidelines. Current age cannot be negative Starting balance cannot be negative Target retirement age cannot be less than current age Target balance at retirement cannot be less than starting balance Amount to contribute each year cannot be negative Projected annual growth in percent cannot be negative The program then determines how many years you need to save before you can coast the rest of the way to retirement to meet your target. The program also shows projected yearbyyear growth up to retirement age, with all monetary amounts rounded to two decimal places. If the target is unreachable with the entered information, the program shows an appropriate message. Assume the growth is compounded annually. Hint: Your program needs to determine the stopping age the age at which you can stop your contributions and coast the rest of the way. From the users current age up to the stopping age, the balance increases from both growth and contributions. From the stopping age up to retirement age, the balance increases from growth only. Use a loop that tests the possible stopping ages from the users current age all the way up to retirement age to determine the lowest one that will achieve their target.
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
