employeeName=input("Enter employee name: ")
employeeType=input("Press F for Full Time or p for Part Time: ")
if employeeType.lower()=="p":
print("---Part Time Employee---")
ratePerHour=float(input("Enter rate per hour: "))
hoursWorked=float(input("Enter no. of hours worked: "))
overtime=float(input("Enter no. of overtime: "))
basicPay=ratePerHour*hoursWorked
overtimePay=overtime* (ratePerHour * 125.0/100.0)
grossPay=basicPay+overtimePay
print("-----------------------------")
print(f"Employee Name: {employeeName}")
print(f"Basic Pay: {basicPay}")
print(f"Overtime Pay: {overtimePay}")
print("-----------------------------")
print(f"Gross Pay: {grossPay}")
elif employeeType.lower()=="f":
print("---Full Time Employee---")
monthlySalary=float(input("Enter monthly salary: "))
print("-----------------------------")
print(f"Employee Name: {employeeName}")
print(f"Basic Pay: {monthlySalary}")
print("-----------------------------")
print(f"Gross Pay: {monthlySalary}")
else:
print("Invalid input")
Comments
Leave a comment