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

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education