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
Classify the functions of dhcp and dns protocols​
Yuki888 [10]

Answer:

Dynamic Host Configuration Protocol (DHCP) enables users to dynamically and transparently assign reusable IP addresses to clients. ... Domain Name System (DNS) is the system in the Internet that maps names of objects (usually host names) into IP numbers or other resource record values.

8 0
2 years ago
Sal Kan earned $3,000.00, But he is only getting $1,585.00 on his pay check to
svetlana [45]

Answer:

Usually, it's because of taxes and insurance.

3 0
3 years ago
In the second example with modulus math, why can't Eve find the solution?
Leno4ka [110]
C. She would have to resort to trial and errors to find a matching exponent
6 0
2 years ago
When a business is using methods that help it use its time and resources the best they can, what are they exercising?
maria [59]
<span>B. Efficiency

(</span><span>effective training </span><span>techniques)</span>
3 0
3 years ago
Read 2 more answers
Given the code that reads a list of integers, complete the number_guess() function, which should choose a random number between
Cerrena [4.2K]

Answer:

see explaination

Explanation:

import random

def number_guess(num):

n = random.randint(1, 100)

if num < n:

print(num, "is too low. Random number was " + str(n) + ".")

elif num > n:

print(num, "is too high. Random number was " + str(n) + ".")

else:

print(num, "is correct!")

if __name__ == '__main__':

# Use the seed 900 to get the same pseudo random numbers every time

random.seed(900)

# Convert the string tokens into integers

user_input = input()

tokens = user_input.split()

for token in tokens:

num = int(token)

number_guess(num)

5 0
3 years ago
Other questions:
  • When it comes to safety, the choice to be safe is often up to __________?
    8·1 answer
  • Excel assigns the name ____ to the first excel table created in a workbook.
    10·1 answer
  • Define the following terms:<br><br> - pigment<br> - vehicle<br> - binder<br><br> plz help
    12·2 answers
  • Drive-by hacking is a computer attack where an attacker accesses a wireless computer network, intercepts data, uses network serv
    5·1 answer
  • Write a program that asks the user for a CSV of the NYC Open Data Film Permits: There is a sample file for June 2019 film permit
    9·2 answers
  • Does any one here play destiny on xbox one
    12·1 answer
  • What are the correct answers?
    11·1 answer
  • The first commercially available digital camera was which of the following?
    9·1 answer
  • In what ways can you modify the location of the neutral point?
    11·1 answer
  • ____ the most popular word processing applications software<br><br>​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!