Question: Use Python and give the code for both a and b by printing some output also which asked in question- Question- the second problem is

Use Python and give the code for both a and b by printing some output also which asked in question-

Question- the second problem is based on first problem

Both a and b are inter related.

a) Many organizations have some sort of a retirement plan. For example, an employer may contribute an amount to your retirement based on your current salary and match any additional amount that the employee invests. For your solution, assume that the organization invests 5% of the employee's salary on their behalf. They also match the rate an employee invests, up to an additional 5% of the employee's salary. You cannot determine how much this retirement plan will be worth year after year into the future. To solve this problem, create a function named fixedInvestor. This function has four required arguments: the employee salary, the employee's personnel investment rate as a percentage of their salary, a fixed growth rate of the retirement plan, and the number of years to evaluate the growth. def fixedInvestor(salary, p_rate, f_rate, years): """ Describe what the function does, what type of information goes into the arguments, and what is returned. """

This function will return a list with the total value of the retirement plan at the end of each year. For the solution, the retirement account is compounded annually. The fixed growth rate of the retirement plan is not used when calculating the first year's return. The formula is the salary multiplied by the rate the employee invested, the rate employer invested, and the rate that the employer matched. In the second year, interest is earned by calculating the earnings from the first year multiplied by the investment growth rate (see Table 1 for examples of the year-overyear computed value).

b) The next problem that needs to be resolved builds on the solution to the first problem. It's been identified that the growth rate of an investment may not be staticthat it may change over time. For this solution, create a function named variableInvestor. This function will have three arguments, similar to problem one. There is one distinct change. The growth rates of the investment plan will be fed to this function as a list. There will be a rate for each year of investing (i.e., if five years of calculations are needed, then the list of growth rates will contain five values). If you consider the list, the rate for the first year can be any value because interest is not earned. The function will no longer use the argument that represents the number of years needed. (The list length will be sufficient to determine the number of years.) def variableInvestor(salary, p_rate, v_rate): """ Describe what the function does, what type of information goes into the arguments, and what is returned. """

Calculating Principal and Interest for Problem One Note. This table depicts the calculations for the principal and interest changes when growth is compounded annually. For this example, the salary is documented as $50,000. The employee's savings rate is 5%, with a 5% matching and a 5% investment on the employee's behalf. The retirement plan growth rate is 5%. Notice that it's calculated with 1.05, not .05

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!