Question: Python problem: An insurance salesperson knows the following about a client: The year the client was born. The age the client wants to retire. The
Python problem:
An insurance salesperson knows the following about a client:
- The year the client was born.
- The age the client wants to retire.
- The annual amount the client can contribute to an IRA.
The insurance agent wants to know the following:
- The number of years until the client retires.
- The number of years until the client is required to take Required Minimum Distributions.
- The balance of the IRA at the age the client wants to retire.
- The balance of the IRA at the age Required Minimum Distributions (RMD) are to be taken.
- The Required Minimum Distribution that must be taken.
The formula to calculate the balance of the IRA is:
B = (((1 + r)n - 1) / r) * A
where:
- B is the balance
- r is the interest rate
- n is the number of years
- A is the annual amount
The formula to calculate the Required Minimum Distribution is:
RMD = B / DP
where:
- RMD is the Required Minimum Distribution to be taken
- B is the balance
- DP is the Distribution Period
Assume the following:
- The client is younger than the age they want to retire.
- The age Required Minimum Distributions are to be taken is 70.
- The expected interest rate is 5%. (Note: 5% will be 0.05 in the formula above)
- The Distribution Period is 27.4
Instructions
Algorithm
Set required minimum distribution age equal to 70 Set expected interest rate equal to 0.05 Set distribution period equal to 27.4 set current year to 2020 Get user input for birth year Get user input for the age the user would like to retire Get user input annual contribution to IRA Add birth year to retirement age and save as retirement year Subtract current year from retirement year and save as years until retirement Add birth year to the required minimum distribution age and save as year of required minimum distribution Subtract current year from year of required minimum distribution and save as years until required minimum distribution To calculate the balance of the IRA for the user's retirement year do the following formula: First find the sum of one plus expected interest rate. Then raise the total to the power of years until retirement. Subtract this total by one Then divide your new total by expected interest rate last multiply your final number by annual contribution to IRA Save this number from the formula above to balance at retirement age To calculate the balance of the IRA for the users required minimum distribution age do following formula: first find the sum of one plus expected interest rate. Then raise the total to the power of the required minimum distribution age. Subtract this total by one. then divide your new total by expected interest rate last multiply your final number by annual contribution to IRA Save this number from the formula above to balance at required minimum distribution age Now to calculate the required minimum distribution that must be taken out. Complete the following formula balance at required minimum distribution age divided by distribution period Save this total from the formula above as required minimum distribution display current year display birth year display retirement age display annual contribution to IRA display years until retirement display years until required minimum distribution display balance at retirement age display balance at required minimum distribution age display required minimum distribution
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
