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
To be useful for most household applications, DC voltage is?please <br>​
satela [25.4K]

Answer: To be useful for most household applications, DC voltage is passed through a step-down transformer.

Explanation: Voltage coming through AC or DC outlets is typically far too high for most household appliances to handle, so the current is passed through a step-down transformer to reduce the voltage to a usable level.

3 0
3 years ago
The _________ attack exploits the common use of a modular exponentiation algorithm in RSA encryption and decryption, but can be
lions [1.4K]

Answer:

chosen ciphertext

Explanation:

Chosen ciphertext attack is a scenario in which the attacker has the ability to choose ciphertexts C i and to view their corresponding decryptions – plaintexts P i . It is essentially the same scenario as a chosen plaintext attack but applied to a decryption function, instead of the encryption function.

5 0
3 years ago
Which of the following is a typical feature of forums but not of review sites?
kkurt [141]
Actually, two options are correct:

They allow private messaging. -  this is your safest option, as review sites don't offer private messaging (many rewiews are anonymous, so that would kill the point), but all forums do.
<span>

You need to sign up to be a member
</span>Actually, this is also true, as many, if not most forums do require you to sign up, so that it is visible whenever a certain person posts again - otherwise you won't know if you're talking to the same person! however, many review sites, for example reviewing doctors, let you post without signing in.
6 0
4 years ago
Read 2 more answers
In theory, a hacker with a small but powerful directional antenna could access a wireless network from more than one mile away.
Svetradugi [14.3K]
100 miles i assume since the avarge antanna cover 5-50 miles
3 0
3 years ago
Why is derek miller's social media post different than most?
fgiga [73]
In the scenario in which Derek Miller's social media post is different than most since Miller had his family and friends write a post after he died with the letter he wrote. Hope this is the answer and would be of help.
5 0
4 years ago
Other questions:
  • Compare and contrast the features of the four computer career fields. Write a paragraph on each and specify how the four career
    13·1 answer
  • What is entered into a cell that is typically numeric and can be used for calculations?
    9·2 answers
  • How to do row of circles in phyton programming ?
    11·1 answer
  • How does the autosum command calculate data? Need help ASAP​
    5·1 answer
  • I need the answers. i don’t get this
    11·1 answer
  • A major concern in the home is the __________ of young children. (6 Letters)
    10·2 answers
  • State the steps for opening Ms word Application ​
    7·1 answer
  • A printer is considered to be in the category of
    5·2 answers
  • The U.S. consumes lots of energy. Which fuel provides the most energy?
    15·2 answers
  • Which would you use to get the number of elements in a dictionary?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!