Question: Pseudocode for the following # input statements salary = float ( input ( Enter salary: ) ) # Prompt the user for input

Pseudocode for the following
# input statements
salary = float(input("Enter salary: ")) # Prompt the user for input and convert it to a float
numDependents = int(input("Enter the number of dependents: ")) # Prompt the user for input and convert it to an integer
# Calculate state withholding tax
stateTax = salary *0.065
print("State Tax: $"+ str(stateTax))
# Calculate federal withholding tax
federalTax = salary *0.28
print("Federal Tax: $"+str(federalTax))
# Calculate dependent deductions
dependentDeduction = salary *0.025* numDependents
print("Dependents: $"+ str(dependentDeduction))
# Calculate total withholding
totalWithholding = stateTax + federalTax + dependentDeduction
#Calculate take-home pay
takeHomePay = salary - totalWithholding
# output statements
print("Salary: $"+ str(salary))
print("Take Home Pay: $"+ str(takeHomePay))

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!