# Constant variables RATE_PER_HOUR = 500 TAX_RATE = 0.10 #User inputs employee_name = input("Employee Name: ") hours_worked = float(input("Enter number of hours: ")) sss_contribution = float(input("SSS contribution: ")) philhealth_contribution = float(input("PhilHealth contribution: ")) house_loan = float(input("Housing Loan: ")) #Calculations gross_salary = RATE_PER_HOUR * hours_worked tax_deduction = gross_salary * TAX_RATE total_deductions = sss_contribution + philhealth_contribution + house_loan + tax_deduction net_salary = gross_salary - total_deductions #Display Employee Information print("\n==========PAYSLIP==========") print("\n==========EMPLOYEE INFORMATION==========\n") print("Employee Name:", employee_name) print("Rendered Hours:", hours_worked) print("Rate per Hour:", RATE_PER_HOUR) print("Gross Salary:", gross_salary) #Display Deductions print("\n==========DEDUCTIONS==========\n") print("SSS:", sss_contribution) print("PhilHealth:", philhealth_contribution) print("Other Loan:", house_loan) print("Tax:", tax_deduction) print("Total Deductions:", total_deductions) print("Net Salary:", net_salary)
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter