draw the flowchart of above programme
print("Welcome To Use Python Service.")
respond = input("Are you want to deal with a transaction ?(Y/N):").upper()
while respond == "Y":
holidaybonus = 0.03
extrabonus = 0.05
_pension = 0.04
print("Please fill in your personal information.")
name = input("Username :")
payment = eval(input("Monthly payment :"))
public_holiday = input("Worked on public holiday(Y/N) :").upper()
hours = eval(input("Total hours worked in a mouth :"))
pension = input("Made payment of pension(Y/N) :").upper()
if public_holiday == "Y":
total_1 = (payment * holidaybonus)
else:
total_1 = 0
if hours >= 160:
total_2 = (payment * extrabonus)
else:
total_2 = 0
if pension == "Y":
total_3 = (payment * _pension)
else:
total_3 = 0
net_pay = payment + total_1 + total_2 - total_3
total_addition = payment + total_1 + total_2
total_deduction = total_3
print("-" * 60)
print("PAYSLIP")
print("Employer's name : TAR Company")
print("Employee's name :",name)
print("Date of payment : NOV 2021")
print()
print("-" * 60)
print("{0:<20s}{1:>1s}{2:^15s}{1:>1s}".format("Remuneration","|","Amount(RM)"))
print("{0:<20s}{1:>1s}{2:>15s}{1:>1s}".format("Monthly Payment","|",format(payment,',.2f')))
print("{0:<20s}{1:>1s}{2:>15s}{1:>1s}".format("Holiday Bonus","|",format(total_1,',.2f')))
print("{0:<20s}{1:>1s}{2:>15s}{1:>1s}".format("Extra Time Bonus","|",format(total_2,',.2f')))
print("-" * 60)
print("{0:<20s}{1:>1s}{2:>15s}{1:>1s}".format("Total Addition","|",format(total_addition,',.2f')))
print("-" * 60)
print()
print("-" * 60)
print("{0:<20s}{1:>1s}{2:^15s}{1:>1s}".format("Deduction","|","Amount(RM)"))
print("{0:<20s}{1:>1s}{2:>15s}{1:>1s}".format("Pension Payment","|",format(total_3,',.2f')))
print("-" * 60)
print("{0:<20s}{1:>1s}{2:>15s}{1:>1s}".format("Total Deduction","|",format(total_deduction,',.2f')))
print("-" * 60)
print()
print("-" * 60)
print("{0:<20s}{1:>1s}{2:>15s}{1:>1s}".format("Net Pay","|",format(net_pay,',.2f')))
print("-" * 60)
print("-" * 60)
print(name,"'s monthly salary is RM",format(net_pay,',.2f'))
respond = input("Next employees’transactions(Y/N):").upper()
if respond == "N":
print("Thank You For Using Python Service.")
draw the flowchart of above programme
Step by step
Solved in 2 steps with 1 images