n this employee's payslip program using python langauge, please create a flowchart of this employee's payslip program. Thank you.    # 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("\n---------------------EMPLOYEE'S PAYSLIP

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter4: Making Decisions
Section: Chapter Questions
Problem 7PE
icon
Related questions
Question
100%

In this employee's payslip program using python langauge, please create a flowchart of this employee's payslip program. Thank you. 

 

# 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("\n---------------------EMPLOYEE'S PAYSLIP---------------------\n")

# 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}')

Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Function Arguments
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning