Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PYTHON: A person in the Civil Service Retirement System can retire at age 55 with at least 20 years of service. A simplified variation for

PYTHON: A person in the Civil Service Retirement System can retire at age 55 with at least 20 years of service. A simplified variation for the computation of the amount of their pension is as follows: In a function calculateAve, calculate the average annual salary for the person's best three years; call it ave. Return ave

In a function percentageRate do the following:

Calculate (number of months)/12 and call it yrs

Calculate percentage rate: 1.5% for each of the first five years, 1.75% for the each of the next five years, and 2% for each addition year. Call it perRate.

Take the minimum of perRate and 80%; call it p. Return p as a decimal.

The amount of the pension is p * ave.

Write a program that requests the input as shown below and calculates the amount of the pension.

The values of ave and p should be computed in functions.

If the input is:

65

448

123456.78

119876.55

107546.45

The output should be:

Enter your age: 65

Enter the number of months of service: 448

Enter first of three highest salaries $123456.78

Enter second of three highest salaries $119876.55

Enter third of three highest salaries $107546.45

Annual pension: $82944.08

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Seven Databases In Seven Weeks A Guide To Modern Databases And The NoSQL Movement

Authors: Luc Perkins, Eric Redmond, Jim Wilson

2nd Edition

1680502530, 978-1680502534

More Books

Students also viewed these Databases questions

Question

KEY QUESTION Refer to the table in question

Answered: 1 week ago

Question

What is the basis for Security Concerns in Cloud Computing?

Answered: 1 week ago

Question

Describe the three main Cloud Computing Environments.

Answered: 1 week ago