SalaryStmt.py Write a python program that accepts name of an employee and employee's yearly sales of last five years. The data should be collected for n employees. The value of n should also be accepted as input. All amounts should be displayed with three decimal places.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
9:18
Assignment 3 - S4 uall clåsll >
SalaryStmt.py
Write a python program that accepts name of an employee and
employee's yearly sales of last five years. The data should be
collected for n employees.
The value of n should also be accepted as input.
All amounts should be displayed with three decimal places.
The output should be displayed as a table containing the Employee
name, Average Sales and Bonus.
The program must define and use a function with Total Sales as a
parameter and should calculate the Average Sales and Bonus for
each employee. Bonus must be calculated based on the following
table:
Average Sales (AS)
AS<5000
50002AS<7500
Bonus
1% of Average Sales
2% of Average Sales
4% of Average Sales
7% of Average Sales
75002AS<10000
AS210000
Sample Output
----
Employee Name
Average Sales
Bonus
=== ---
AFRAH
ASMA
ATHEER
343.080
129.536
49.430
718.200
8577.000
6476.800
4943,000
HAJAR
10260.000
MALLAK
MARYAM
NOORA
SAHAR
SHEFAA
TAGHARID
7876.600
315.064
6780.400
135.608
8822.200
9126.800
7631.000
7580.400
352.888
365.072
305.240
303.216
=
===
Transcribed Image Text:9:18 Assignment 3 - S4 uall clåsll > SalaryStmt.py Write a python program that accepts name of an employee and employee's yearly sales of last five years. The data should be collected for n employees. The value of n should also be accepted as input. All amounts should be displayed with three decimal places. The output should be displayed as a table containing the Employee name, Average Sales and Bonus. The program must define and use a function with Total Sales as a parameter and should calculate the Average Sales and Bonus for each employee. Bonus must be calculated based on the following table: Average Sales (AS) AS<5000 50002AS<7500 Bonus 1% of Average Sales 2% of Average Sales 4% of Average Sales 7% of Average Sales 75002AS<10000 AS210000 Sample Output ---- Employee Name Average Sales Bonus === --- AFRAH ASMA ATHEER 343.080 129.536 49.430 718.200 8577.000 6476.800 4943,000 HAJAR 10260.000 MALLAK MARYAM NOORA SAHAR SHEFAA TAGHARID 7876.600 315.064 6780.400 135.608 8822.200 9126.800 7631.000 7580.400 352.888 365.072 305.240 303.216 = ===
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY