print("Welcome To Use Python Service.") respond = input("Are you want to handle a transaction ?(Y/N):").upper() #validation of respond while respond != "Y" and respond != "N" :     print("Please enter 'Y' or 'N'")     respond = input("Are you want to handle 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:").upper() #validation of name     while not name.replace(" ","").isalpha() :         print("Invalid name.")         name = input("Username:").upper()          payment = input("Monthly payment:") #validation of payment     while not payment.replace(".","").isdigit():          print("Invalid input.Please digits only !")         payment = input("Monthly payment:")     payment = eval(payment)              public_holiday = input("Worked on public holiday(Y/N):").upper() #validation of public_holiday     while public_holiday != "Y" and public_holiday != "N" :         print("Invalid input.Please enter 'Y' or 'N'")         public_holiday = input("Worked on public holiday(Y/N):").upper()          hours = input("Total hours worked in a month:") #validation of hours     while not hours.replace(".","").isdigit():          print("Invalid input.Please digits only !")         hours = input("Total hours worked in a month:")     hours = eval(hours)          pension = input("Made payment of pension(Y/N):").upper() #validation of pension     while pension != "Y" and pension != "N" :         print("Please enter 'Y' or 'N'")         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          print("_" * 37)     print("PAYSLIP")     print("Company's name : TARUC SDN.BHD.")     print("Employee's name :",name)     print("Pay Period : NOV 2021")     print("_" * 37)     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("-" * 37)     print("{0:<20s}{1:>1s}{2:>15s}{1:>1s}".format("Total Addition","|",format(total_addition,',.2f')))     print("-" * 37)     print("_" * 37)     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("-" * 37)     print("{0:<20s}{1:>1s}{2:>15s}{1:>1s}".format("Total Deduction","|",format(total_3,',.2f')))     print("-" * 37)     print("_" * 37)     print("{0:<20s}{1:>1s}{2:>15s}{1:>1s}".format("Net Pay","|",format(net_pay,',.2f')))     print("_" * 37)     print("_" * 37)     respond = input("Is there another employee to handle a transaction ?(Y/N):").upper()     while respond != "Y" and respond != "N" :         print("Please enter 'Y' or 'N'")         respond = input("Is there another employee to handle a transaction ?(Y/N):").upper() if respond == "N":     print("Thank You For Using Python Service.")     show the flowchart of the programme above

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

print("Welcome To Use Python Service.")
respond = input("Are you want to handle a transaction ?(Y/N):").upper()

#validation of respond
while respond != "Y" and respond != "N" :
    print("Please enter 'Y' or 'N'")
    respond = input("Are you want to handle 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:").upper()
#validation of name
    while not name.replace(" ","").isalpha() :
        print("Invalid name.")
        name = input("Username:").upper()
    
    payment = input("Monthly payment:")
#validation of payment
    while not payment.replace(".","").isdigit(): 
        print("Invalid input.Please digits only !")
        payment = input("Monthly payment:")
    payment = eval(payment)
        
    public_holiday = input("Worked on public holiday(Y/N):").upper()
#validation of public_holiday
    while public_holiday != "Y" and public_holiday != "N" :
        print("Invalid input.Please enter 'Y' or 'N'")
        public_holiday = input("Worked on public holiday(Y/N):").upper()
    
    hours = input("Total hours worked in a month:")
#validation of hours
    while not hours.replace(".","").isdigit(): 
        print("Invalid input.Please digits only !")
        hours = input("Total hours worked in a month:")
    hours = eval(hours)
    
    pension = input("Made payment of pension(Y/N):").upper()
#validation of pension
    while pension != "Y" and pension != "N" :
        print("Please enter 'Y' or 'N'")
        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
    
    print("_" * 37)
    print("PAYSLIP")
    print("Company's name : TARUC SDN.BHD.")
    print("Employee's name :",name)
    print("Pay Period : NOV 2021")
    print("_" * 37)
    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("-" * 37)
    print("{0:<20s}{1:>1s}{2:>15s}{1:>1s}".format("Total Addition","|",format(total_addition,',.2f')))
    print("-" * 37)
    print("_" * 37)
    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("-" * 37)
    print("{0:<20s}{1:>1s}{2:>15s}{1:>1s}".format("Total Deduction","|",format(total_3,',.2f')))
    print("-" * 37)
    print("_" * 37)
    print("{0:<20s}{1:>1s}{2:>15s}{1:>1s}".format("Net Pay","|",format(net_pay,',.2f')))
    print("_" * 37)
    print("_" * 37)
    respond = input("Is there another employee to handle a transaction ?(Y/N):").upper()
    while respond != "Y" and respond != "N" :
        print("Please enter 'Y' or 'N'")
        respond = input("Is there another employee to handle a transaction ?(Y/N):").upper()
if respond == "N":
    print("Thank You For Using Python Service.")

 

 

show the flowchart of the programme above

Expert Solution
steps

Step by step

Solved in 4 steps with 5 images

Blurred answer
Similar questions
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY