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

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter5: Repetition Statements
Section5.4: For Loops
Problem 12E
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
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning