phyton 3#use if, elif or else In a company, the net salary of employees is a function of two discounts: the social security contribution and the income tax. Given the employee's gross salary, social security contributions are paid according to the following table:      Gross salary                   aliquot Up to  $ 1,659.38                    8%   From $ 1,659.39 to  $ 2,765.66                    9%   From  $ 2,765.67 to $ 5,531.31                    11%   Above  $ 5,531.31   Fixed discount of  $ 608.44   After discounting the social security contribution, the remaining amount is then used to calculate the income tax discount, based on this table:            Base salary                 Discount rate   Up to   $ 1,903.98            Exempt   From  $ 1,903.99 to $ 2,826.65                    7.5%    From $ 2,826.66 to $ 3,751.05               15%   From  $ 3,751.06 to $ 4,664.68 22.5%                22.5% Above $ 4,664.68                 27.5% Write a program that reads a person's gross salary and applies both discounts. As an output, print the following: Net salary = $ X Tips First calculate the social security contribution and discount the gross salary. Then use the remaining amount to determine the income tax discount. Finally, subtract that amount and determine the net salary amount. Use the round (x, n) command to round the answer x to 2 decimal places. Use the logical operator (and) to compare differences Input and Output >>Examples Input : $ 5000.00 ; Output: Net salary =  $ 3448.75 Input: $ 1550.00; Output: Net salary = $ 1426.0

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

 

phyton 3#use if, elif or else

In a company, the net salary of employees is a function of two discounts: the social security contribution and the income tax. Given the employee's gross salary, social security contributions are paid according to the following table:


     Gross salary

                  aliquot

Up to  $ 1,659.38

 

                 8%

 

From $ 1,659.39 to  $ 2,765.66

 

                 9%

 

From  $ 2,765.67 to $ 5,531.31                    11%

 

Above  $ 5,531.31

 

Fixed discount of  $ 608.44

 

After discounting the social security contribution, the remaining amount is then used to calculate the income tax discount, based on this table:


           Base salary

 

              Discount rate

 

Up to   $ 1,903.98

 

 

       Exempt

 

From  $ 1,903.99 to $ 2,826.65

 

                 7.5% 

 

From $ 2,826.66 to $ 3,751.05               15%

 

From  $ 3,751.06 to $ 4,664.68 22.5%

 

             22.5%

Above $ 4,664.68

 

              27.5%

Write a program that reads a person's gross salary and applies both discounts. As an output, print the following: Net salary = $ X

Tips First calculate the social security contribution and discount the gross salary. Then use the remaining amount to determine the income tax discount. Finally, subtract that amount and determine the net salary amount. Use the round (x, n) command to round the answer x to 2 decimal places. Use the logical operator (and) to compare differences

Input and Output >>Examples Input : $ 5000.00 ; Output: Net salary =  $ 3448.75

Input: $ 1550.00; Output: Net salary = $ 1426.0

Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Types of Function
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