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
What to do if you click on a phishing link on iphone
gregori [183]

Answer:

Nothing, just exit out of it

Explanation:

5 0
2 years ago
Read 2 more answers
Write a for loop that computes the following sum: 5+10+15+20+...+485+490+495+500. The sum should be placed in a variable sum tha
Strike441 [17]

Answer:

public class num9 {

   public static void main(String[] args) {

       int sum =0;

       int num =5;

       for(num =5; num<=500; num+=5){

           System.out.println(num);

           sum +=num;

       }

       System.out.println(sum);

   }

}

Explanation:

  • Declare and initialize the variables sum and num
  • Use a for loop with the condition for(num =5; num<=500; num+=5) Since the loop will increment by 5 and run from 5 to 500
  • Within the loop, add num to sum at each iteration
  • Print all elements on seperate lines
  • Outside the loop, print the final value of sum

Create a for loop

6 0
3 years ago
Typically, a programmer develops a programâs logic, writes the code, and ____ the program, receiving a list of syntax errors.
miv72 [106K]
"debugs" is the answer
4 0
3 years ago
Write a statement to declare a variable x with data type int and initialise with the value 10​
nexus9112 [7]

Answer:

int x = 10;

Explanation:

This would work in many languages (C/C++/C#/Java).

6 0
2 years ago
Pleeeese help me for these questions
geniusboy [140]

1 Account

2 online

3 access

4 password

5 internet

6 email

4 0
3 years ago
Other questions:
  • In UNIX, how do I set the permissions on MyProgram.py to: rwx---r-x?
    7·1 answer
  • What makes iron man different from other superheroes ? why is iron man the best superhero ??
    5·2 answers
  • Michale spent 80 minutes at the libary he finished studying at 4:00 what time did michale start studying
    8·1 answer
  • The birthday problem is as follows: given a group of n people in a room, what is the probability that two or more of them have t
    15·1 answer
  • You are creating a presentation and you have come to the last slide. you still have more information to add. what should you do?
    10·2 answers
  • Select the correct answer.
    7·2 answers
  • -) An attribute is a(n)?
    5·1 answer
  • Which areas of a business would most benefit from using the Workday platform?
    7·1 answer
  • When can designers use rapid application development?
    8·1 answer
  • In the software development process, which review studies the software design before it is released for coding?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!