#Activity 3.2.2
print("WAGE CALCULATOR")
print("-" * 38)
####
valid = False
while valid == False:
    print("")
    natIns = input("Enter the employee's NI number: ")
    if len(natIns) == 9:
        valid = True
    else:
        print("The NI number you entered is incorrect.")
####          
status = ""
while not (status == "y" or status == "n"):
    status = input("Is this employee full-time (y/n)?: ").lower()
    if not (status =="y" or status == "n"):
        print("You must enter 'y' or 'n'.")
####
valid = False
hoursWorked = int(input("Enter the hours worked: "))
while (hoursWorked < 0 or hoursWorked > 40) or valid == False:
    if hoursWorked < 0 or hoursWorked > 40:
        print("The number of hours worked must be between 0 and 40")
        hoursWorked = int(input("Enter the hours worked: "))
    elif status == "n" and hoursWorked > 20:
        print("Part time employees can only work for up to 20 hours per week.")
        hoursWorked = int(input("Enter the hours worked: "))
    else:
        valid = True
####
payRate = float(input("Enter the pay rate: "))

print("\nThese are the details you have entered:")
print("\nNI number", natIns, "\nFull time:", status, "\nHours worked:", hoursWorked,"\nPay rate:", "{:.2f}".format(payRate))
correct = input("\nIs this information correct (y/n)? : ").lower()
if correct == "y":
    print("Wages due:",  "{:.2f}".format(hoursWorked * payRate))
else:
    print("You will have to enter the details again.")
        

