make a flowchart out of this code import pyfiglet class employee: # ASCII ART USING PYFIGLET header = pyfiglet.figlet_format("EMPLOYEE INFORMATION", font = "cybermedium" ) print(header) #data def data_entry(data): data.emp_no = input("Enter employee number: ") data.emp_name = input("Enter employee name: ") data.emp_pos = input("Enter employee position: ") data.emp_year_hired = int(input("Enter the year hired: ")) data.emp_sal = float(input("Enter Employee Rate(per hour): ")) data.emp_serv = 2022 - data.emp_year_hired print("*"*36) #determine the status of the employee by the number of years they served. def sal_entry(data): if(data.emp_serv < 2): data.emp_stat = 'Contractual' bon_per = 10 rph = data.emp_sal elif((data.emp_serv >=2) and (data.emp_serv < 4)): data.emp_stat = 'Probationary' bon_per = 20 rph = data.emp_sal elif((data.emp_serv >=4) and (data.emp_serv < 11)): data.emp_stat = 'Tenured' bon_per = 50 rph = data.emp_sal elif((data.emp_serv >=11)): data.emp_stat = 'Tenured' bon_per = 75 rph = data.emp_sal else: result = pyfiglet.figlet_format("ERROR", font = "cybermedium" ) print(result) # gross and annual salary calculation data.gross_sal = 160 * rph data.annual_sal = data.gross_sal * 12 # yearend bonus calculation data.year_end_bonus = data.annual_sal * (bon_per/100) #PAYSLIP def payslip(data): print("\n\n") slip = pyfiglet.figlet_format("EMPLOYEE PAYSLIP", font = "cybermedium" )#ASCII ART USING PYFIGLET print(slip) print("NAME :\t\t\t", data.emp_name) print("EMPLOYEE NUMBER :\t", data.emp_no) print("POSITION :\t\t", data.emp_pos) print("EMPLOYEE STATUS :\t", data.emp_stat) print("YEAR HIRED :\t\t", data.emp_year_hired) print("YEARS OF SERVICE :\t", data.emp_serv) print("GROSS SALARY :\t\t", format (data.gross_sal, ".2f")) print("ANNUAL SALARY :\t\t", format (data.annual_sal, ".2f")) print("YEAR END BONUS :\t", format (data.year_end_bonus, ".2f")) print("\n") print("*"*36) e = employee() e.data_entry() e.sal_entry() e.payslip(
make a flowchart out of this code
import pyfiglet
class employee:
# ASCII ART USING PYFIGLET
header = pyfiglet.figlet_format("EMPLOYEE INFORMATION", font = "cybermedium" )
print(header)
#data
def data_entry(data):
data.emp_no = input("Enter employee number: ")
data.emp_name = input("Enter employee name: ")
data.emp_pos = input("Enter employee position: ")
data.emp_year_hired = int(input("Enter the year hired: "))
data.emp_sal = float(input("Enter Employee Rate(per hour): "))
data.emp_serv = 2022 - data.emp_year_hired
print("*"*36)
#determine the status of the employee by the number of years they served.
def sal_entry(data):
if(data.emp_serv < 2):
data.emp_stat = 'Contractual'
bon_per = 10
rph = data.emp_sal
elif((data.emp_serv >=2) and (data.emp_serv < 4)):
data.emp_stat = 'Probationary'
bon_per = 20
rph = data.emp_sal
elif((data.emp_serv >=4) and (data.emp_serv < 11)):
data.emp_stat = 'Tenured'
bon_per = 50
rph = data.emp_sal
elif((data.emp_serv >=11)):
data.emp_stat = 'Tenured'
bon_per = 75
rph = data.emp_sal
else:
result = pyfiglet.figlet_format("ERROR", font = "cybermedium" )
print(result)
# gross and annual salary calculation
data.gross_sal = 160 * rph
data.annual_sal = data.gross_sal * 12
# yearend bonus calculation
data.year_end_bonus = data.annual_sal * (bon_per/100)
#PAYSLIP
def payslip(data):
print("\n\n")
slip = pyfiglet.figlet_format("EMPLOYEE PAYSLIP", font = "cybermedium" )#ASCII ART USING PYFIGLET
print(slip)
print("NAME :\t\t\t", data.emp_name)
print("EMPLOYEE NUMBER :\t", data.emp_no)
print("POSITION :\t\t", data.emp_pos)
print("EMPLOYEE STATUS :\t", data.emp_stat)
print("YEAR HIRED :\t\t", data.emp_year_hired)
print("YEARS OF SERVICE :\t", data.emp_serv)
print("GROSS SALARY :\t\t", format (data.gross_sal, ".2f"))
print("ANNUAL SALARY :\t\t", format (data.annual_sal, ".2f"))
print("YEAR END BONUS :\t", format (data.year_end_bonus, ".2f"))
print("\n")
print("*"*36)
e = employee()
e.data_entry()
e.sal_entry()
e.payslip(
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 2 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)