Question: Complete the program below using Online GDB . This program calculates take net pay for a single pay period State tax calculated is salary

Complete the program below using "Online GDB".
This program calculates take net pay for a single pay period
State tax calculated is salary times state tax rate
Federal tax is salary times federal tax rate
Dependent deduction is salary times dependent deduction times number of dependents
Total withholding is state tax plus federal tax minus dependent deduction
Net pay is salary minus total withholding
===================== Copy the program below this line ===================
'''
Student name, 2024FA ch-2_lab02
'''
# =============== program constants
STATE_TAX_RATE =0.065
FEDERAL_TAX_RATE =0.28
DEPENDENT_DEDUCTION =0.015
# ===============data input
print()
salary = float(input("Enter salary: "))
numDependents = int(input("Enter number of dependents: "))
# ================================= complete calculations below
# ============================= print results fill in variable name for ???
print()
print(f'Salary: ${salary:,.2f}')
print(f'State Tax: $ {stateTax:,.2f}')
print(f'Federal Tax: $ {federalTax:,.2f}')
print(f'Dependents: ${dependents:,.2f}')
print(f'Take Home Pay: $ {netPay:,.2f}')

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 Programming Questions!