0% found this document useful (0 votes)
4 views1 page

Competency (Python)

The document outlines a Python script for an Employee Salary Calculator used by Codewave Solutions Ltd. It prompts for an employee's name, total hours worked, and hourly rate, then calculates and displays the employee's performance rating, tax paid, and gross salary. The program allows for multiple employee entries until the user chooses to exit.

Uploaded by

mickeyleon29
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

Competency (Python)

The document outlines a Python script for an Employee Salary Calculator used by Codewave Solutions Ltd. It prompts for an employee's name, total hours worked, and hourly rate, then calculates and displays the employee's performance rating, tax paid, and gross salary. The program allows for multiple employee entries until the user chooses to exit.

Uploaded by

mickeyleon29
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

print("\t\tCODEWAVE SOLUTIONS LTD\n")

print("\t Employee Salary Calculator\n")

while True:
while True:
n = input("Enter worker's full name: ")
if input("Confirm? (Y=Continue, N=Re-enter): ").upper() == 'Y':
break

while True:
h = float(input("\nEnter total hours worked: "))
if input("Confirm? (Y=Continue, N=Re-enter): ").upper() == 'Y':
break

while True:
r = float(input("\nEnter hourly rate: "))
if input("Confirm? (Y=Continue, N=Re-enter): ").upper() == 'Y':
break

print(f"\nEmployee: {n}\nRating: {'Excellent Performer!' if h >= 45


else 'Satisfactory' if h >= 35 else 'Needs improvement!'}\nHours Worked:
{h:.2f}\nRate: ${r:.2f}\nTax paid (10%): ${h * r * 0.1:.2f}\nGross Salary:
${h * r * 0.9:.2f}\n")

while (a := input("Another employee? (Y=Yes, N=Exit): ").upper()) not


in 'YN': print("Please enter Y or N.")
if a != 'Y': break
print("\nGoodbye!")

You might also like