A person in the Civil Service Retirement System can retire at age 55 with at least 20 years of service.
A simplified variation of the computation of the amount of their pension as follows:
- Calculate the average annual salary for the persons best three years; call it ave.
- Calculate number of months divided by 12 and call it yrs.
- Calculate the percentage rate: 1.5% for the first five years, 1.75 for the next five years, 2% for each additional year. Call it perRate.
- Take the minimum of perRate and 80%; call it p.
- The amount of the pension is p*ave.
Write a program that requests the inputs as shown in below figure, and calculates the amount of the pension.
The values of ave and p should be computed in functions.
**I am using Python 3.6.8**
Question (2) A person in the Civil Service Retirement System can retire at age 55 with 20 years of service. A simplified variation of the computation of the amount of their pension as follows: Calculate the average annual salary for the person's best three years; call it ave. Calculate number of months divided by 12 and call it yrs. Calculate the percentage rate: 1.5% for the first five years, 1.75 for the next five years, 2% for each additional year. Call it per Rate. Take the minimum of perRate and 80%; call it p. The amount of the pension is p'ave. Write a program that requests the inputs as shown in below figure, and calculates the amount of the pension. The values of ave and p should be computed in functions. Enter your age: 65 Enter number of months of service: 448 Enter first of three highest salaries: Enter second of three highest salaries Enter third of three highest salar Annual pension: $82,944.08 123456.78 119876.55 107546.45 The percentage Rate is a marginal rate that is 1.5% for the first 5 years then 1.75 for the next five. So if you worked 6 years, you would have a 5*0.015 +1*017-0925 rate. In the example, it does not round the years down to an integer, but instead computes the decimal value for the additional years rate. (448 months - 27.33 years) The minimum portion essentially means that the percentage cannot exceed.80. thus, if you worked 40+ years it would just cap out at.80. Question (2) A person in the Civil Service Retirement System can retire at age 55 with 20 years of service. A simplified variation of the computation of the amount of their pension as follows: Calculate the average annual salary for the person's best three years; call it ave. Calculate number of months divided by 12 and call it yrs. Calculate the percentage rate: 1.5% for the first five years, 1.75 for the next five years, 2% for each additional year. Call it per Rate. Take the minimum of perRate and 80%; call it p. The amount of the pension is p'ave. Write a program that requests the inputs as shown in below figure, and calculates the amount of the pension. The values of ave and p should be computed in functions. Enter your age: 65 Enter number of months of service: 448 Enter first of three highest salaries: Enter second of three highest salaries Enter third of three highest salar Annual pension: $82,944.08 123456.78 119876.55 107546.45 The percentage Rate is a marginal rate that is 1.5% for the first 5 years then 1.75 for the next five. So if you worked 6 years, you would have a 5*0.015 +1*017-0925 rate. In the example, it does not round the years down to an integer, but instead computes the decimal value for the additional years rate. (448 months - 27.33 years) The minimum portion essentially means that the percentage cannot exceed.80. thus, if you worked 40+ years it would just cap out at.80