Question: In this program create a flow chart # read the name of the employee name = input(Enter employee's name:) # read number of hours worked

In this program create a flow chart # read the name of the employee name = input("Enter employee's name:") # read number of hours worked and convert it to integer using int() hours = int(input('Enter number of hours worked in a week:')) # read hourly rate and convert it to float using float() hourly_rate = float(input('Enter hourly pay rate:')) # read federal tax rate and convert it to float using float() federal_tax = float(input('Enter federal tax withholding rate:')) # read state tax rate and convert it to float using float() state_tax = float(input('Enter state tax withholding rate:')) # print the employee pay slip print(" ---------------------EMPLOYEE'S PAYSLIP--------------------- ") # print the name of the employee print(f"Employee's Name: {name}") # print number of hours worked print(f"Hours Worked: {hours}") # print hourly rate of the employee print(f"Pay Rate: $ {hourly_rate}") # calculate the gross pay # gross pay is number of hours multiplied by hourly rate gross_pay = hours*hourly_rate # print gross pay print(f"Gross Pay: $ {gross_pay}") # print all types of deductions print("Deductions:") # calculate federal deduction federal = federal_tax*gross_pay # it is federal rate times gross pay # calculate state deduction state = state_tax*gross_pay # it is state rate times gross pay # calculate total deductions total_deductions = federal + state # it is sum of federal and state deduction # print federal deduction print(f'\t\tFederal Witholding( {federal_tax*100} %) : $ {federal}') # print state deduction print(f'\t\tState Witholding( {state_tax*100} %) : $ {state}') # print total deductions print(f'\t\tTotal Deduction: $ {total_deductions}') # calculate net pay net_pay = gross_pay-total_deductions # it is difference gross pay and total deductions # print net pay print(f'Net Pay:$ {net_pay}')

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!