1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Evgen [1.6K]
3 years ago
9

1. Write the Python code needed to perform the following:2. Calculate state withholding tax (stateTax) at 6.5 percent3. Calculat

e federal withholding tax (federalTax) at 28.0 percent.4. Calculate dependent deductions (dependentDeduction) at 2.5 percent of the employee’s salary for each dependent.5. Calculate total withholding (totalWithholding) as stateTax + federalTax+ dependentDeduction.6. Calculate take-home pay (takeHomePay) as salary- totalWithholding7. Execute the program by clicking the "Run Code" button at the bottom. You should get the following output:State Tax: $81.25Federal Tax: $350.00000000000006Dependents: $62.5Salary: $1250.0Take-Home Pay: $756.25In this program, the variables named salary and numDependents are initialized with the values 1250.0 and 2. To make this program more flexible, modify it to accept interactive input for salaryand numDependents.
Computers and Technology
1 answer:
Firdavs [7]3 years ago
3 0

Answer:

salary=float(input("Enter salary : "))

numDependents=int(input("Enter number of dependents : "))

stateTax=salary*0.065

federalTax=salary*0.28

dependentDeduction=salary*0.025*numDependents

totalWithholding=stateTax + federalTax+ dependentDeduction

takeHomePay=salary- totalWithholding

print("State Tax :$",str(stateTax))

print("Federal Tax :$",str(federalTax))

print("Dependents:$",str(dependentDeduction))

print("Salary :$",str(salary))

print("Take-Home Pay:$",str(takeHomePay))

Explanation:

  • Take the salary as input from user.
  • Take number of dependents as an input from user.
  • Calculate the state tax and Federal Tax. Then calculate the independent detection tax by multiplying salary with 0.025 as well as number of dependents.
  • After that calculate total withholding and then calculate home pay by subtracting total withholding from salary.
  • Finally print all the details.
You might be interested in
In this lesson, you learned how to create reports and how to display them in a Web application. You will use the same chinook da
Nimfa-mama [501]

create a report that displays back tge total sales by country

6 0
2 years ago
Tom teaches in a high school. He wishes to sort a spreadsheet containing students' marks in various subjects by descending order
cricket20 [7]

Answer:

Select the data to sort

Explanation:

4 0
3 years ago
Tuesday
4vir4ik [10]

Answer:

?

Explanation:

these are instructions to a question?

7 0
2 years ago
Which symbol should you use for entering a formula in a cell?
Sonbull [250]

A symbol which should be used for entering a formula in a cell is: B. =.

<h3>What is Microsoft Excel?</h3>

Microsoft Excel can be defined as a software application that is designed and developed by Microsoft Inc., for analyzing and displaying spreadsheet documents by using rows and columns in a tabulated format.

<h3>What is a spreadsheet?</h3>

In Computer technology, a spreadsheet can be defined as a document which comprises cells that are arranged in a tabulated format with rows and columns. Also, a spreadsheet is typically used in various field to do the following on a data:

  • Sort
  • Calculate
  • Format
  • Arrange

As a general rule, "B. =" is a symbol which should be used for entering a formula in a cell on a spreadsheet application such as Microsoft Excel.

Read more on spreadsheets here: brainly.com/question/4965119

#SPJ1

3 0
1 year ago
How do you insert a table by using standard toolbar?​
MissTica

Answer:

Click the Insert Table button on the Standard Toolbar. Drag over the grid that appears to select the number of rows and columns you want. To use automatic formatting, choose Table AutoFormat from the Table menu. Select several Formats from the menu on the left to see how the table will look.

5 0
2 years ago
Other questions:
  • What is Processor to Memory Mismatch problem?
    15·1 answer
  • You are planning trip to South America and and are worried about your devices with private keys being stolen. So you decide to s
    9·1 answer
  • which of the following is a component of a rope-rewind starter system? a. a recoil spring c. an air vane governor b. a wrist pin
    5·1 answer
  • Write the algorithm and draw a flowchart to display the greatest number among any two different numbers....
    5·1 answer
  • Return a version of the given string, where for every star (*) in the string the star and the chars immediately to its left and
    11·1 answer
  • To specify your preferred colors, fonts, and effects for a document, which of the following should be done?
    5·2 answers
  • Please Help!
    13·1 answer
  • Which view is most often used to reorder slides in a presentation that has already been created?
    15·2 answers
  • Sarah used a grid to create this layout for a website. Which rule of composition did Sarah use for the grid?
    7·2 answers
  • A transistor may be used as an amplifier in an electronic circuit. <br> Select one: True False
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!