Question: ANACONDA JUPYTER NOTEBOOK PYTHON 3 In this assignment you will calculated the expected pension of an employee. Assume that a public receives annual increases in

ANACONDA JUPYTER NOTEBOOK PYTHON 3

  1. In this assignment you will calculated the expected pension of an employee. Assume that a public receives annual increases in salary at a constant rate and that their pension is calculated on their years of service and salary. Assume that the pension of an employee is calculated as follows:

    • Under 10 years of employment: no pension
    • 10 - or more years of employment: pension is calculated as follows,
    • number of years of employment/40.0 x salary in last year of employment
    • the amount of the annual pension cannot be greater than 80% of the salary in last year of employment

    Ask the user for their initial salary (a float), the annual increases in salary (as a percentage) (a float) and the completed number of years of service (an int). Test that the values entered are >= 0, trap the user until they enter values >= 0. Output the annual pension amount the employee will receive.

    Example input and output:

    Enter your starting salary: 10000

    Enter the expected annual increase per year: .02

    Enter your completed years of service: 9

    Annual Pension: 0

    Enter your starting salary: 10000

    Enter the expected annual increase per year: .02

    Enter your completed years of service: 20

    Annual Pension: 7429.736979891771

    Enter your starting salary: 10000

    Enter the expected annual increase per year: .02

    Enter your completed years of service: 50

    Annual Pension: 21532.704232588843

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!