Question

In: Computer Science

Python problem: An insurance salesperson knows the following about a client: The year the client was...

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

Solutions

Expert Solution

min_distribution_age = 70 # required minimum distribution age

interest_rate = 0.05 # expected interest rate

distribution_period = 27.4 # distribution period

current_year = 2020 # current year

birth_year = int(input("Enter birth year"))

retirment_age = int(input("Age of retirement"))

IRA_annual = float(input("Annual IRA contribution"))

retirment_year = birth_year + retirment_age # retirement year

year_until_retire = retirment_year - current_year # years until retirement

year_req_min_dist = birth_year + min_distribution_age # year of required minimum distribution

year_until_min_dist = year_req_min_dist - birth_year # years until required minimum distribution

# calculate balance at retirement age

balance_retirement_age = ((((1+interest_rate)**year_until_retire) -1) / interest_rate) * IRA_annual

# calculate the balance of the IRA for the users required minimum distribution age

balance_min_dist_age = ((((1 + interest_rate) * min_distribution_age) - 1) / interest_rate) * IRA_annual

# calculate required minimum distribution

req_min_distribution = balance_min_dist_age / distribution_period

print("Current year : {}".format(current_year))

print("Birth year : {}".format(birth_year))

print("Returement age: {}".format(retirment_age))

print("Annual contribution to IRA : {}".format(IRA_annual))

print("Years untill retirement : {}".format(year_until_retire))

print("Year unitll required minimum distribution : {}".format(year_until_min_dist))

print("Balance at retirment age : {}".format(balance_retirement_age))

print("Balance at required minimum distribution age : {}".format(balance_min_dist_age))

print("Required minimum distribution : {}".format(req_min_distribution))


Related Solutions

Lonestar Insurance provides liability insurance to its client base of 10,442 clients. Every year, about 2,565...
Lonestar Insurance provides liability insurance to its client base of 10,442 clients. Every year, about 2,565 lawsuits are covered by Lonestar. What is the probability (in percent) that one of their clients will be served with a liability lawsuit in any given year?
FOR PYTHON: Write a python program for a car salesperson who works a five day week....
FOR PYTHON: Write a python program for a car salesperson who works a five day week. The program should prompt for how many cars were sold on each day and then prompt for the selling price of each car (if any) on that day. After the data for all five days have been entered, the program should report the total number of cars sold and the total sales for the period. See example output. NOTE: duplicate the currency format shown...
A big problem insurance companies run up against is ___________, meaning that the applicant knows more...
A big problem insurance companies run up against is ___________, meaning that the applicant knows more about his own health than the insurance company is legitimately able to gather. Compensating Differential Moral Hazard Comparative Advantage Asymetric Information
Who knows to do this topic with python code? Write a program to perform the following...
Who knows to do this topic with python code? Write a program to perform the following two tasks: 1. The program will accept a string as input in which all of the words are run together, but the first character of each word is uppercase. Convert the string to a string in which the words are separated by spaces and only the first word starts with an uppercase letter. For example, the string "StopAndSmellTheRose" would be converted to "Stop and...
After making an appointment with a prospect / client, the salesperson must plan for the sales...
After making an appointment with a prospect / client, the salesperson must plan for the sales call. Demonstrate how your firm’s salesperson apply the FOUR (4) facets of sales call planning before he or she meets the prospect / client. Justify the salesperson’s activities in ensuring the success of the sales call. its a 15 mark question so answer in details.
The nurse is caring for a client with a hypochromic, microcytic anemia. The nurse knows the...
The nurse is caring for a client with a hypochromic, microcytic anemia. The nurse knows the type of anemia is called ___________________________. The three types of macrocytic anemias are ______________________, ______________________________, ___________________________________. List at least 5 of the signs and symptoms of anemia.
On February 1, a salesperson for Metropolitan Life Insurance met with the Drakes at their home....
On February 1, a salesperson for Metropolitan Life Insurance met with the Drakes at their home. The Drakes lived in a 55+ retirement community with a homeowners association that prohibited door-to-door sales. After facing a persuasive sales pitch about the importance of providing for the surviving spouse and their kids and grandkids, the Drakes signed a contract to purchase a life insurance policy for a total of $3000 per year. A down payment of $100 was required, with the remainder...
A nurse at the local Senior Center made the following notation about a client: A 74-year-old...
A nurse at the local Senior Center made the following notation about a client: A 74-year-old female client wearing eyeglasses with bifocal lenses and hearing aid in her left ear. Walks with a shuffling gait, using a cane for support. Wearing house slippers and housedress. States, "My other doctor says I should have my eyes looked at by an expert. It's been a while, and my eyes seem to be acting up lately. I can't see so good anymore." The...
A firm in a perfectly competitive industry knows the following about its costs and revenue. The...
A firm in a perfectly competitive industry knows the following about its costs and revenue. The firm would like to maximize profit and has hired a consultant for advice. Price           Q of Output              Total Revenue              Total Cost               Total Fixed Cost P?                  Q?                             7,400                           TC?                           3,300 Total Variable Cost          Average Total Cost          Average Variable Cost         MC                          TVC?                                 9                                   3                                5 Part 1. Average Fixed Cost ____ Part 2. Price _____ Part 3: Quantity _____ Part 4. Total Cost _____ Part 5. What is the value of...
A life insurance salesperson claims the average worker in the city of Winnipeg has no more...
A life insurance salesperson claims the average worker in the city of Winnipeg has no more than $25,000 of personal life insurance. To test this claim, you randomly sample 100 workers in Winnipeg. You find that this sample of workers averages $26,250 of personal life insurance. The population standard deviation is $12,000. Determine whether the test shows enough evidence to reject the null hypothesis posed by the salesperson. Assume α = 0.05. The value of the test statistic is?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT