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
Write a repetition statement that outputs the numbers 45 , 51 , . . . , 165 . That is, all of the multiples of 6 in increasing o
Bingel [31]

Answer:

#include <iostream>

using namespace std;

int main()

{

   int i = 45;

   for ( i = 45; i <=165; i = i + 6)

       cout << i << endl;

}

Explanation:

I corrected your code and highlighted the mistakes. Even though you wrote the correct algorithm, your code did not compile because of the typos you made.

Remember, C++ is a case-sensitive language. That means, "For" is not same as "for".

Generally, variables and keywords are written in lower case. Of course, there are exceptions, such as constant variables are all written in uppercase letter and class names start with an uppercase letter.

8 0
3 years ago
Which of the following best describes a proxy firewall? A. It sends traffic through another host. B. It acts as a gateway for re
12345 [234]
The answer would be B, for your computer is considered a client instead of server.
6 0
3 years ago
When is it appropriate to delete an entire row or column as opposed to deleting the data in the row or column
borishaifa [10]

Answer:

huh wdym

Explanation:

7 0
3 years ago
61. Select an activity of the Production Phase: a. a web authoring tool is often used b. the graphics, web pages, and other comp
Elodia [21]

Answer:

d. all of the above.

Explanation:

Since the advent of digital technology, production of goods and services have experienced a significant change from the traditional methods of production. This paradigm shift is made possible by the application of various modern technology.

Production processes are generally being facilitated and enhanced by the use of;

1. Computer-integrated manufacturing (CIM).

2. Computer-aided process planning (CAPP).

3. Computer-aided design (CAD).

4. Computer numerical control (CNC).

In the process of selecting an activity of the production phase:

1. A web authoring tool is often used.

2. The graphics, web pages, and other components are created.

3. The web pages are individually tested.

7 0
3 years ago
Any radio hardware containing a transmitter and a receiver that is located in a fixed location is called a _______
arsen [322]

Answer:

base station

Explanation:

According to my research on information technology, I can say that based on the information provided within the question this type of radio hardware is referred to as a base station. These are tied to a fixed location and used to communicate as part of either: a push-to-talk two-way radio system, or a wireless telephone system such as cellular CDMA or GSM.

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

4 0
3 years ago
Other questions:
  • What might be the best response to a cyberbuly attack
    6·2 answers
  • The mathematical order of operations is used in Excel when formulas are evaluated. This order of operations states the order to
    9·2 answers
  • Lucy has to move data from column A to column N in a worksheet. Which keys should she select to move data in the same worksheet?
    7·2 answers
  • Soo...My Old 3DS XL haven't been touched in around a year...So i tried to charge it but no LED lights opened..Even the power but
    14·1 answer
  • How do you copy and paste a screenshot on an hd computer
    12·2 answers
  • The idea that innovations in transportation and communication technologies has changed the way we think about distance and time
    9·1 answer
  • True / False<br> An instruction’s opcode generally indicates the number and type of its operands.
    5·1 answer
  • with the advent of technology one can experience special features such as 3D theater experiences true or false
    8·1 answer
  • The difference between page break and section brek​
    5·2 answers
  • Text Questions
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!