Write a program that asks the user to input the following data for n employees: - • Basic Salary • Experience years • Employee Class Then do the following for each one: - float value. integer value integer value (1 or 2 or 3) only. 1. Calculate the Basic allowance according to the following table:

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
1) Employee salary.py
Write a program that asks the user to input the following data for n employees: -
• Basic Salary
• Experience years
• Employee Class
Then do the following for each one: -
float value.
integer value
integer value (1 or 2 or 3) only.
1. Calculate the Basic allowance according to the following table:
Basic Allowance
7% of Basic Salary
Basic Salary
Basic Salary < 200
200 s Basic Salary < 400
10% of Basic Salary
400 S Basic Salary
15% of Basic Salary
2. Calculate the Technical allowance according to the following table: -
Experience Years
Technical Allowance
Experience Years 2 10
20% of Basic Salary
Experience Years
12% of Basic Salary
< 10
3. Calculate the Gross salary according to the following formula: -
Gross salary = Basic salary + Basic allowance +Technical Allowance
4. Calculate the Retirement Deduction according to the following table:-
Gross Salary
Gross Salary < 300
Gross Salary
Gross Salary
Gross Salary
Gross Salary
Gross Salary < 600
Class
Retirement Deduction
2% of
4% of
Gross Salary
Gross Salary
Gross Salary
1
300 s
< 500
500 S
6% of
< 200
< 400
5% of
Gross Salary
200 s
400 S
78 of
Gross Salary
Gross Salary
Gross Salary
2
9% of
600 S Gross Salary
12 of
3
no retirement deduction for this class
5. Calculate the Net Salary according to the following formula
Net salary = Gross salary - retirement deduction
6. Calculate the average of net salaries for all employees
YOUR INPUT AND OUTPUT SHOULD BE AS THE FOLLOWING SAMPLE:-
Enter No. of employees:3
Enter the basic salary of employee (1):350
Enter the class of employee
(1):2
Enter experience years for employee(1):15
------emp(1)----
= 350
= 15
Technical Allowance = 70.0 Gross salary
Retirement Deduction=40.95 Net salary = 414.05
= 2
Basic Allowance= 35.0
= 455.0
CLASS
Basic Salary
Experience Years
Enter the basic salary of employee (2):500
Enter the class of employee
(2):1
Enter experience years for employee(2):20
---emp(2)---
= 500
= 20
Basic Salary
Experience Years
Technical Allowance = 100.0 Gross salary
Retirement Deduction=40.50 Net salary
CLASS
= 1
Basic Allowance= 75.0
= 675.0
= 634.5
-------
Enter the basic salary of employee (3):400
Enter the class of employee
Enter experience years for employee(3):8
------------------emp(3)-------
Basic Salary
Experience Years
Technical Allowance = 48.0 Gross salary
Retirement Deduction=0.00
(3):3
= 3
Basic Allowance = 60.0
= 508.0
= 508.0
= 400
= 8
CLASS
Net salary
-----------
-------
Average of all net salaries =518.85
Transcribed Image Text:1) Employee salary.py Write a program that asks the user to input the following data for n employees: - • Basic Salary • Experience years • Employee Class Then do the following for each one: - float value. integer value integer value (1 or 2 or 3) only. 1. Calculate the Basic allowance according to the following table: Basic Allowance 7% of Basic Salary Basic Salary Basic Salary < 200 200 s Basic Salary < 400 10% of Basic Salary 400 S Basic Salary 15% of Basic Salary 2. Calculate the Technical allowance according to the following table: - Experience Years Technical Allowance Experience Years 2 10 20% of Basic Salary Experience Years 12% of Basic Salary < 10 3. Calculate the Gross salary according to the following formula: - Gross salary = Basic salary + Basic allowance +Technical Allowance 4. Calculate the Retirement Deduction according to the following table:- Gross Salary Gross Salary < 300 Gross Salary Gross Salary Gross Salary Gross Salary Gross Salary < 600 Class Retirement Deduction 2% of 4% of Gross Salary Gross Salary Gross Salary 1 300 s < 500 500 S 6% of < 200 < 400 5% of Gross Salary 200 s 400 S 78 of Gross Salary Gross Salary Gross Salary 2 9% of 600 S Gross Salary 12 of 3 no retirement deduction for this class 5. Calculate the Net Salary according to the following formula Net salary = Gross salary - retirement deduction 6. Calculate the average of net salaries for all employees YOUR INPUT AND OUTPUT SHOULD BE AS THE FOLLOWING SAMPLE:- Enter No. of employees:3 Enter the basic salary of employee (1):350 Enter the class of employee (1):2 Enter experience years for employee(1):15 ------emp(1)---- = 350 = 15 Technical Allowance = 70.0 Gross salary Retirement Deduction=40.95 Net salary = 414.05 = 2 Basic Allowance= 35.0 = 455.0 CLASS Basic Salary Experience Years Enter the basic salary of employee (2):500 Enter the class of employee (2):1 Enter experience years for employee(2):20 ---emp(2)--- = 500 = 20 Basic Salary Experience Years Technical Allowance = 100.0 Gross salary Retirement Deduction=40.50 Net salary CLASS = 1 Basic Allowance= 75.0 = 675.0 = 634.5 ------- Enter the basic salary of employee (3):400 Enter the class of employee Enter experience years for employee(3):8 ------------------emp(3)------- Basic Salary Experience Years Technical Allowance = 48.0 Gross salary Retirement Deduction=0.00 (3):3 = 3 Basic Allowance = 60.0 = 508.0 = 508.0 = 400 = 8 CLASS Net salary ----------- ------- Average of all net salaries =518.85
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 4 images

Blurred answer
Knowledge Booster
Function Arguments
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education