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
Match each malware type to its description
zhenek [66]

1. Trojan Horse

2. Worm

3. Virus

6 0
4 years ago
What best describes the difference between plagiarism and fair use
Colt1911 [192]
The answer is ..........
 
<span>Fair use </span>

The doctrine of fair use allows the limited use of copyrighted material for certain educational, scholarly and research purposes without the permission of the copyright owner. It applies to any copyrighted material regardless of source, including the Internet. If you photocopy a page from one of your textbooks or print a page from a copyrighted Internet site for certain educational, scholarly or research purposes, your actions may fall under the doctrine of fair use. The copyright laws give you permission to copy the work<span> (with certain limitations), even though the owner of the copyright did not.


V.S

</span>Plagiarism

Plagiarism is "the representation of another's work or ideas as one's own; it includes the unacknowledged word-for-word use and/or paraphrasing of another<span> person's work, and/or the inappropriate unacknowledged use of another person's </span><span>ideas" (The Ohio State University Code of Student Conduct). This means that if </span><span>you use another person's work when completing any academic assignment,</span><span> </span><span>regardless </span>

5 0
4 years ago
Read 2 more answers
Unlike other malware, a ____ is heavily dependent upon the user for its survival. trojan worm rootkit virus
KatRina [158]
A virus is dependent on the user
7 0
4 years ago
In order to protect your computer from the newest virus, which of the follshoukd you do after you've installed virus scan softwa
puteri [66]
Right away scan your computer periodically.<span />
5 0
3 years ago
a toy company has released a new toe that is a huge hit. they are liiking at different packing companies, so that their toy can
guapka [62]
What exactly has this have anything to do with computers
4 0
4 years ago
Other questions:
  • In a word processor, Tariq chooses Options from the Tools menu and then selects the Track Changes tab. Which of the following ta
    14·1 answer
  • You will be administratively suspended if you have a breath or blood alcohol level of.... or above or refuse to submit to a chem
    12·1 answer
  • When you choose a(n) ___________ installation, you only install selected features, rather than all of the features associated wi
    13·1 answer
  • • Why does a lunar eclipse last longer than a solar eclipse?
    15·1 answer
  • "a technician claims to have crimped a patch cable according to the T568A standard on one e d and T568B on the other"
    9·1 answer
  • A computer ________ is two or more computers connected using software and hardware so that they can communicate with each other.
    10·1 answer
  • Which allows for saving a setting on one device and having the setting synchronize to other devices? Choose two answers.
    12·1 answer
  • Kelly completes a bachelor's degree in animation from a top school in New York. She would now like to look for a job that will p
    5·2 answers
  • The fill command try’s to fill or generate content for cells based on a ________.
    15·1 answer
  • Handhed computer is otherwise called as<br> 1.laptop<br> 2.Notebook<br> 3.Palmtop
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!