Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: Python Homework

  1. #1
    New to the CF scene
    Join Date
    Mar 2018
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Python Homework

    Can somebody solve this problem?

    Write a program for BigRaises, Inc. that requests that a user enters a name, a job classification, an age, and a starting salary. The program should then calculate, based on the job classification and the age, what the yearly salary is and how much total money that employee will make over the span of their career.

    The job classifications are:

    IT, M, and C. IT stands for Information Technology and the annual raises are 3.5%. M stands for Management and the raises are 2.5% per year. And C stands for Clerical and the annual raises are 2%. Annual raises mean that the employees get a raise next year, then a raise on top of that the following year, another one the next year, etc.

    The mandatory retirement at BigRaises, Inc. is 65 years of age. That is, employees can only work until age 65.

    The job classification entry should be validated. That is, only IT, it, M, m, C, or c should be allowed. If an invalid string is entered for the job classification, the program should display an error message and ask the user to enter the correct string. This should happen until a valid job classification is entered.

    Here is a sample program execution.

    This program calculates an employeeís salary and career earnings based on job classification and age.

    Enter name: Johann

    Enter job classification (IT, M, or C): musician

    You entered an invalid job classification.

    Enter name: Johann

    Enter job classification (IT, M, or C): IT

    Enter age: 25

    Enter starting salary: 65000

    Johann, here is your salary schedule for the next 40 years.

    Age 25 Salary 65000.00

    Age 26 Salary 67275.00

    Age 27 Salary 69629.63

    . . .

    . . .

    . . .

    Age 63 Salary 240240.74

    Age 64 Salary 248649.16

    Over the course of your career, you will have earned $ 5495678.05

    Please print and save for your records.

    Note: I did not include the years from age 28 through 63 to save space. Your output should include all of the years from the starting age to age 65.

    Make sure that you follow the Program Submission Guidelines document for documentation, comments, spacing, naming, etc.

    After you create, run, and verify that your program is ready for submission, upload the .py file here

  2. #2
    Super Moderator vinyl-junkie's Avatar
    Join Date
    Jun 2003
    Posts
    3,457
    Thanks
    3
    Thanked 50 Times in 50 Posts
    Before someone on these forums eats you alive, let me just point out our forum rules, particularly rule 1.5 regarding homework assignments:

    1.5) No homework assignments - Do not post your entire homework assignment and request that other members do it for you. This is considered cheating, and your thread may even be used by your school to prove your guilt. Now, you may ask for advice or help on a specific aspect of your assignment that you're having trouble with. Use common sense as far as what's acceptable in terms of soliciting help with homework assignments.
    Of course, if you post the code you have so far, you're more likely to receive some help here.

    BTW, welcome to CF!
    Music Around The World - Collecting tips, trade and want lists, album reviews, & more


 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •